author | Junio C Hamano <junkio@cox.net> | |
Wed, 21 Feb 2007 22:31:10 +0000 (14:31 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 21 Feb 2007 22:42:15 +0000 (14:42 -0800) | ||
commit | 9987d7c58a847ab1605ae3216ff1ca95b19f0ad1 | |
tree | b3ee784213e862551771c30ee3fa092ef6ee22d5 | tree | snapshot |
parent | 6c912f5b04e3216a5487e03235a8454b754a464e | commit | diff |
git-apply: notice "diff --git" patch again
Earlier one that tried to be too consistent with GNU patch by
not stripping the leading path when we _know_ we are in a
subdirectory and the patch is relative to the toplevel was a
mistake. This fixes it.
- No change to behaviour when it is run from the toplevel of
the repository.
- When run from a subdirectory to apply a git-generated patch,
it uses the right -p<n> value automatically, with or without
--index nor --cached option.
- When run from a subdirectory to apply a randomly generated
patch, it wants the right -p<n> value to be given by the
user.
The second one is a pure improvement to correct inconsistency
between --index and non --index case, compared with 1.5.0. The
third point could be further improved to guess what the right
value for -p<n> should be by looking at the patch, but should be
a topic of a separate patch.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Earlier one that tried to be too consistent with GNU patch by
not stripping the leading path when we _know_ we are in a
subdirectory and the patch is relative to the toplevel was a
mistake. This fixes it.
- No change to behaviour when it is run from the toplevel of
the repository.
- When run from a subdirectory to apply a git-generated patch,
it uses the right -p<n> value automatically, with or without
--index nor --cached option.
- When run from a subdirectory to apply a randomly generated
patch, it wants the right -p<n> value to be given by the
user.
The second one is a pure improvement to correct inconsistency
between --index and non --index case, compared with 1.5.0. The
third point could be further improved to guess what the right
value for -p<n> should be by looking at the patch, but should be
a topic of a separate patch.
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-apply.c | diff | blob | history | |
t/t4119-apply-config.sh | diff | blob | history |