Browse Source

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
maint
Shawn O. Pearce 16 years ago
parent
commit
15dc66abf0
  1. 13
      Documentation/config.txt
  2. 4
      merge-recursive.c
  3. 11
      t/t3030-merge-recursive.sh

13
Documentation/config.txt

@ -363,8 +363,17 @@ core.pager:: @@ -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

4
merge-recursive.c

@ -419,10 +419,8 @@ static int remove_file(struct merge_options *o, int clean, @@ -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;
}

11
t/t3030-merge-recursive.sh

@ -535,4 +535,15 @@ test_expect_success 'reset and bind merge' ' @@ -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

Loading…
Cancel
Save