Re: [PATCH] improve doc heading for git-bisect
- From
Jeff King <peff@peff.net>
- Date
- Jun 8, 2008, 04:35 UTC
- Message-ID
- <20080608043543.GB11194@sigill.intra.peff.net>
- In-Reply-To
- <9af502e50806070906u63e52de4wa0bc4dced0c4d984@mail.gmail.com>
On Sat, Jun 07, 2008 at 09:06:19AM -0700, Robert Anderson wrote:
Show 5 quoted lines
> > FYI this line is not necessary, and should be removed from > > git-format-patch output when pasting it to your MUA. > > Err, then shouldn't it be removed from format-patch, rather than > deleted manually every time format-patch is used?
As others have pointed out, the usual way for using format-patch is to create an mbox that you then pull into your MUA (e.g., I do "git format-patch --stdout origin >mbox; mutt -f mbox").
However, sometimes it is desirable to cut and paste, either because it is inconvenient to bring the message into your MUA this way, or if you are just putting a commit into an email you have already started writing.
I was going to suggest a "--paste" option for format-patch which would produce a nicer output for cutting and pasting, but it is trivial to do with an alias:
git config --global \
alias.pastepatch \
'format-patch --pretty=format:%s%n%n%b'(actually, this loses the author information versus using the --pretty=email format, but if you are just sending your own work, it is fine).
It is essentially the same as "git log --stat -p" except that the commit message is indented properly, and the revision arguments are interpreted as format-patch does.
-Peff