Re: git apply: git diff header lacks filename information for git diff --no-index patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[Cc: git@xxxxxxxxxxxxxxx, Jeff King <peff@xxxxxxxx>, 
 Imre Deak <imre.deak@xxxxxxxxx>]

Jeff King wrote:

> On Thu, Oct 02, 2008 at 09:27:36PM +0300, Imre Deak wrote:
> 
>> $ git apply patch
>> fatal: git diff header lacks filename information (line 4)
>> $ cat patch
>> diff --git a/dev/null b/a
>> new file mode 100644
>> index 0000000000000000000000000000000000000000..1f2a4f5ef3df7f7456d91c961da36fc58904f2f1
>> GIT binary patch
> 
> Hmm. The problem is that "git apply" doesn't accept that "a/dev/null"
> and "b/a" are the same, so it rejects them as a name. I

Shouldn't it be "/dev/null", not "a/dev/null"?  

Besides git-diff(1) states:

  1. It is preceded with a "git diff" header, that looks like
     this:

       diff --git a/file1 b/file2

     The `a/` and `b/` filenames are the same unless rename/copy is
     involved.  Especially, even for a creation or a deletion,
     `/dev/null` is _not_ used in place of `a/` or `b/` filenames.

Looks like a bug in patch generation code...
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux