1
0
mirror of https://github.com/git/git.git synced 2024-10-03 11:41:26 +02:00

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:
Shawn O. Pearce 2008-09-26 08:31:56 -07:00
commit 15dc66abf0
3 changed files with 23 additions and 5 deletions

@ -363,8 +363,17 @@ core.pager::
variable. Note that git sets the `LESS` environment
variable to `FRSX` if it is unset when it runs the
pager. One can change these settings by setting the
`LESS` variable to some other value or by giving the
`core.pager` option a value such as "`less -+FRSX`".
`LESS` variable to some other value. Alternately,
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::
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;
}
if (update_working_directory) {
unlink(path);
if (errno != ENOENT || errno != EISDIR)
if (remove_path(path) && errno != ENOENT)
return -1;
remove_path(path);
}
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