Merge branch 'maint'
* maint: Remove empty directories in recursive merge Documentation: clarify the details of overriding LESS via core.pager Conflicts: builtin-merge-recursive.c
This commit is contained in:
@ -363,8 +363,17 @@ core.pager::
|
|||||||
variable. Note that git sets the `LESS` environment
|
variable. Note that git sets the `LESS` environment
|
||||||
variable to `FRSX` if it is unset when it runs the
|
variable to `FRSX` if it is unset when it runs the
|
||||||
pager. One can change these settings by setting the
|
pager. One can change these settings by setting the
|
||||||
`LESS` variable to some other value or by giving the
|
`LESS` variable to some other value. Alternately,
|
||||||
`core.pager` option a value such as "`less -+FRSX`".
|
these settings can be overridden on a project or
|
||||||
|
global basis by setting the `core.pager` option.
|
||||||
|
Setting `core.pager` has no affect on the `LESS`
|
||||||
|
environment variable behaviour above, so if you want
|
||||||
|
to override git's default settings this way, you need
|
||||||
|
to be explicit. For example, to disable the S option
|
||||||
|
in a backward compatible manner, set `core.pager`
|
||||||
|
to "`less -+$LESS -FRX`". This will be passed to the
|
||||||
|
shell by git, which will translate the final command to
|
||||||
|
"`LESS=FRSX less -+FRSX -FRX`".
|
||||||
|
|
||||||
core.whitespace::
|
core.whitespace::
|
||||||
A comma separated list of common whitespace problems to
|
A comma separated list of common whitespace problems to
|
||||||
|
@ -419,10 +419,8 @@ static int remove_file(struct merge_options *o, int clean,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (update_working_directory) {
|
if (update_working_directory) {
|
||||||
unlink(path);
|
if (remove_path(path) && errno != ENOENT)
|
||||||
if (errno != ENOENT || errno != EISDIR)
|
|
||||||
return -1;
|
return -1;
|
||||||
remove_path(path);
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -535,4 +535,15 @@ test_expect_success 'reset and bind merge' '
|
|||||||
|
|
||||||
'
|
'
|
||||||
|
|
||||||
|
test_expect_success 'merge removes empty directories' '
|
||||||
|
|
||||||
|
git reset --hard master &&
|
||||||
|
git checkout -b rm &&
|
||||||
|
git rm d/e &&
|
||||||
|
git commit -mremoved-d/e &&
|
||||||
|
git checkout master &&
|
||||||
|
git merge -s recursive rm &&
|
||||||
|
test_must_fail test -d d
|
||||||
|
'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
Reference in New Issue
Block a user