From: Thomas Rast <trast@student.ethz.ch>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [bug?] git-format-patch produces a 0-byte long patch for the first commit
Date: Mon, 23 Mar 2009 17:29:03 +0100 [thread overview]
Message-ID: <200903231729.08216.trast@student.ethz.ch> (raw)
In-Reply-To: <Pine.LNX.4.64.0903231119110.4871@axis700.grange>
[-- Attachment #1: Type: text/plain, Size: 669 bytes --]
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 #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2009-03-23 16:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-23 10:34 [bug?] git-format-patch produces a 0-byte long patch for the first commit Guennadi Liakhovetski
2009-03-23 16:29 ` Thomas Rast [this message]
2009-03-23 16:46 ` Guennadi Liakhovetski
2009-03-26 17:29 ` [PATCH] Documentation: format-patch --root clarifications Thomas Rast
2009-03-24 7:54 ` [bug?] git-format-patch produces a 0-byte long patch for the first commit Jeff King
2009-03-24 8:02 ` Guennadi Liakhovetski
2009-03-24 11:46 ` Johannes Schindelin
2009-03-24 11:51 ` Guennadi Liakhovetski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200903231729.08216.trast@student.ethz.ch \
--to=trast@student.ethz.ch \
--cc=g.liakhovetski@gmx.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).