diff options
author | Junio C Hamano <junkio@cox.net> | 2007-02-21 16:05:56 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-02-21 16:05:56 -0800 |
commit | 3e8a5db966c26a0a986161103d59683b909a6c78 (patch) | |
tree | 3a0df292e42e49cec2e49f04b29450473e8e4975 /builtin-branch.c | |
parent | git-apply: notice "diff --git" patch again (diff) | |
download | tgif-3e8a5db966c26a0a986161103d59683b909a6c78.tar.xz |
git-apply: guess correct -p<n> value for non-git patches.
This enhances the third point in the previous commit. When
applying a non-git patch that begins like this:
--- 2.6.orig/mm/slab.c
+++ 2.6/mm/slab.c
@@ -N,M +L,K @@@
...
and if you are in 'mm' subdirectory, we notice that -p2 is the
right option to use to apply the patch in file slab.c in the
current directory (i.e. mm/slab.c)
The guess function also knows about this pattern, where you
would need to use -p0 if applying from the top-level:
--- mm/slab.c
+++ mm/slab.c
@@ -N,M +L,K @@@
...
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-branch.c')
0 files changed, 0 insertions, 0 deletions