Re: git-apply fails on creating a new file, with both -p and --directory specified
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 8, 2009, 02:59 UTC
- Message-ID
- <7vk4wyqigf.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <loom.20091207T222449-752@post.gmane.org>
James Vega <vega.james@gmail.com> writes:
> It looks like this may have introduced a bug when staging a file > removal. Here's an example git session showing the issue: > <<snipped>>
Thanks for a report, but I cannot get the evidence that the said patch has anything to do with the issue you illustrated.
$ cat >patch0 <<\EOF
diff --git a/foo b/foo deleted file mode 100644 index 257cc56..0000000 --- a/foo +++ /dev/null @@ -1 +0,0 @@ -foo EOF $ git apply --numstat patch0 0 1 foo $ sed -e '/deleted file/d' patch0 | git apply --numstat 0 1 dev/null The last one is showing the symptom in your message. Git versions 1.4.0 and newer yield the same result, but 1.3.0 gives a funny message: ** warning: file dev/null becomes empty but is not deleted 0 1 foo So it appears that the bug is somewhere else not in that patch.