All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: Junio C Hamano <gitster@pobox.com>,
	Michael Haggerty <mhagger@alum.mit.edu>,
	git@vger.kernel.org, Johan Herland <johan@herland.net>,
	Jonathan Nieder <jrnieder@gmail.com>
Subject: Re: Idea: "git format-patch" should get more information out of git
Date: Tue, 30 Aug 2011 11:22:17 -0400	[thread overview]
Message-ID: <20110830152217.GA13022@sigill.intra.peff.net> (raw)
In-Reply-To: <4E5CD5B9.80306@drmicha.warpmail.net>

On Tue, Aug 30, 2011 at 02:21:13PM +0200, Michael J Gruber wrote:

> > After playing around a bit with my earlier series, I made the
> > realization (perhaps obvious to others :) ), that if you are in a
> > pure-patch workflow, keeping the "---" in your commit message locally is
> > much simpler. It follows the commit around through rebases
> > automatically, it gets put into format-patch output automatically, and
> > so forth.
> 
> I'm confused: Does format-patch keep it or strip it as you say above?

Format-patch will include the whole commit message, including "---" and
what comes after. But an "am" recipient will strip it out of the commit
message. IOW, you locally treat your "---" notes as part of the commit
message, but in a pure-patch workflow, upstream treats it as something
to be stripped out.

So there is asymmetry in what is in your commit versus what is in
upstream's commit. But that's OK, because how you treat the commit
(something to be tweaked and rebased, and then mailed out) and how
upstream treats it (something to go into the long-term project history)
are different.

But that breaks down if you ever want to share actual commit objects
with upstream.

> Anyways, notes survive rebase etc.

You still have to manually configure:

  git config notes.rewriteRef refs/notes/commits

Perhaps that is something that should be changed.

> and at format-patch time you can decide whether you want to include
> them or not (with my patch).

Yeah. Don't get me wrong, I think putting "---" notes into git-notes is
way more flexible. It's just that it's also more complex, and
unnecessarily so for many use cases.

We have some patches to hide that complexity, but I was at one point
wondering if all of the complexity was worthwhile. But as I mentioned
above, if you want to build anything more complex than a pure-patch
workflow, the simple solution breaks down. So it probably is worth
pursuing.

-Peff

  reply	other threads:[~2011-08-30 15:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-27  5:12 Idea: "git format-patch" should get more information out of git Michael Haggerty
2011-08-27 18:46 ` Junio C Hamano
2011-08-27 20:35   ` Michael J Gruber
2011-08-28  6:21     ` Michael Haggerty
2011-08-28  6:34   ` Junio C Hamano
2011-08-29 18:55     ` Jeff King
2011-08-30 12:21       ` Michael J Gruber
2011-08-30 15:22         ` Jeff King [this message]
2011-08-30 15:41           ` Michael J Gruber
2011-08-30 17:39             ` Johan Herland
2011-09-01  4:32               ` Michael Haggerty
2011-09-01  6:44                 ` Michael J Gruber

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=20110830152217.GA13022@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johan@herland.net \
    --cc=jrnieder@gmail.com \
    --cc=mhagger@alum.mit.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.