author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Mon, 17 Sep 2007 00:24:57 +0000 (01:24 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 17 Sep 2007 01:20:10 +0000 (18:20 -0700) | ||
commit | ece7b74903007cee8d280573647243d46a6f3a95 | |
tree | 768d9bc4eaf26d832cc4f566385055e20f19dd39 | tree | snapshot |
parent | f3caeb9ac2ea13cf113183540f32fbc4c0468ed5 | commit | diff |
apply --index-info: fall back to current index for mode changes
"git diff" does not record index lines for pure mode changes (i.e. no
lines changed). Therefore, apply --index-info would call out a bogus
error.
Instead, fall back to reading the info from the current index.
Incidentally, this fixes an error where git-rebase would not rebase a
commit including a pure mode change, and changes requiring a threeway
merge.
Noticed and later tested by Chris Shoemaker.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
"git diff" does not record index lines for pure mode changes (i.e. no
lines changed). Therefore, apply --index-info would call out a bogus
error.
Instead, fall back to reading the info from the current index.
Incidentally, this fixes an error where git-rebase would not rebase a
commit including a pure mode change, and changes requiring a threeway
merge.
Noticed and later tested by Chris Shoemaker.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-apply.c | diff | blob | history | |
t/t3400-rebase.sh | diff | blob | history |