Re: [PATCH] builtin-apply.c: Skip filenames without enough components
- From
- Andreas Gruenbacher <agruen@suse.de>
- Date
- Jan 17, 2010, 02:44 UTC
- Message-ID
- <201001170344.34525.agruen@suse.de>
- In-Reply-To
- <7vr5ppa2st.fsf@alter.siamese.dyndns.org>
On Sunday 17 January 2010 03:22:10 am Junio C Hamano wrote:
> Tests?
Sure if you think it's worth a regression test ... "git apply -p2" of the following patch fails with "fatal: git diff header lacks filename information when removing 2 leading pathname components (line 6)" with the fix, and creates b/f without:
diff --git a/f b/f new file mode 100644 index 0000000..6a69f92 --- /dev/null +++ b/f @@ -0,0 +1 @@ +f
(Some earlier versions of git failed with "fatal: git apply: bad git-diff - inconsistent new filename on line 5" in this case.)
Andreas