Honor -p<n> when applying git diffs
commit79ee194e52a140412da475e102145bad80d5d00a
authorShawn O. Pearce <spearce@spearce.org>
Wed, 4 Apr 2007 15:19:14 +0000 (4 11:19 -0400)
committerJunio C Hamano <junkio@cox.net>
Thu, 5 Apr 2007 22:06:58 +0000 (5 15:06 -0700)
treed963fe533852d2015b21d43a68e2dd4864dcaccb
parent766b084f59c97bc8b096a59cd5c8d06df5aa2bc5
Honor -p<n> when applying git diffs

If the user is trying to apply a Git generated diff file and they
have specified a -p<n> option, where <n> is not 1, the user probably
has a good reason for doing this.  Such as they are me, trying to
apply a patch generated in git.git for the git-gui subdirectory to
the git-gui.git repository, where there is no git-gui subdirectory
present.

Users shouldn't supply -p2 unless they mean it.  But if they are
supplying it, they probably have thought about how to make this
patch apply to their working directory, and want to risk whatever
results may come from that.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-apply.c
t/t4120-apply-popt.sh [new file with mode: 0755]