Re: [PATCH] improve doc heading for git-bisect

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

 



On Sat, Jun 07, 2008 at 09:06:19AM -0700, Robert Anderson wrote:

> > 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
--
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