Re: [bug?] git-format-patch produces a 0-byte long patch for the first commit

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

 



Guennadi Liakhovetski wrote:
> mkdir x
> cd x
> git-init
> echo hi > greating
> git-commit -a
[...]
> git-format-patch HEAD^ produces an error, 

There is no HEAD^ in this case.  HEAD is always the currently checked
out commit.  Since it has a root commit, it has no parent, so you
cannot apply ^ ("the first parent of") to it.  Similarly, HEAD~2 will
not work if HEAD~1 has no parent, etc.

> git-format-patch -1 produces a 0-byte long patch.

That is admittedly weird and probably deserves a fix and/or suggestion
to use --root.

I'm not sure what else I can add to the explanations I gave on IRC.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

Attachment: signature.asc
Description: This is a digitally signed message part.


[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