git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Junio C HamanoNext: Johannes Schindelin
Message 6 of 8 in “improve doc heading for git-bisect”
  1. improve doc heading for git-bisectRobert Anderson, Jun 7, 2008
  2. Jakub NarebskiJun 7, 2008
  3. Robert AndersonJun 7, 2008
  4. Jakub NarebskiJun 7, 2008
  5. Junio C HamanoJun 7, 2008
  6. Jeff KingJun 8, 2008
  7. Johannes SchindelinJun 8, 2008
  8. Jeff KingJun 8, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.