git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [RFC/PATCH] commit notes workflow
Date: Sun, 27 Feb 2011 15:31:50 +0100	[thread overview]
Message-ID: <4D6A6056.20201@drmicha.warpmail.net> (raw)
In-Reply-To: <20110225133056.GA1026@sigill.intra.peff.net>

Jeff King venit, vidit, dixit 25.02.2011 14:30:
> I was revising a long-ish series today, and I have been wanting to start
> using "git notes" to store information on what's changed between
> versions (which will eventually go after the "---" in format-patch).
> 
> So my workflow was something like:
> 
>   1. git rebase -i, mark one or more commits for edit
> 
>   2. For each commit we stop at:
> 
>      a. Tweak the tree either with enhancements, or to resolve
>         conflicts from tweaks to earlier patches.
> 
>      b. commit --amend, tweak commit message is needed
> 
>      c. git notes add, mention changes
> 
>      d. git rebase --continue
> 
> Two things annoyed me:
> 
>   1. Editing the commit message and notes separately felt awkward. They
>      are conceptually part of the same task to me.
> 
>   2. In the conflict case, there is no opportunity to run "git notes
>      add" because you fix up commits and directly run "rebase
>      --continue".
> 
> So my solution was that "git commit" should be able to embed and extract
> notes from the commit message itself. The patch below implements "git
> commit --notes", which does two things:
> 
>   1. If we are amending, it populates the commit message not just with
>      the existing message, but also with a "---" divider and any notes on
>      the commit.
> 
>   2. After editing the commit message, it looks for the "---" divider
>      and puts everything after it into a commit note (whether or not it
>      put in a divider in step (1), so you can add new notes, too).
> 
> So your commit template looks like:
> 
>   subject
> 
>   commit message body
>   ---
>   notes data
> 
>   # usual template stuff
> 
> I'm curious what people think. Do others find this useful? Does it seem
> harmful?

I can haz tis wiz "format-patch --notes-behind-triple-dash"?

Michael

  parent reply	other threads:[~2011-02-27 14:30 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-25 13:30 [RFC/PATCH] commit notes workflow Jeff King
2011-02-25 15:58 ` Johan Herland
2011-03-01 21:59   ` Jeff King
2011-03-02  0:21     ` Johan Herland
2011-03-03  1:57       ` Sverre Rabbelier
2011-03-03  3:50         ` Junio C Hamano
2011-03-03 11:12           ` Sverre Rabbelier
2011-03-03 11:23             ` [PATCH] commit, status: #comment diff output in verbose mode Ian Ward Comfort
2011-03-03 11:25               ` Sverre Rabbelier
2011-03-07 23:39       ` [RFC/PATCH] commit notes workflow Jeff King
2011-03-07 23:39         ` [PATCH 1/2] notes: make expand_notes_ref globally accessible Jeff King
2011-03-08  8:25           ` Johan Herland
2011-03-07 23:41         ` [PATCH 2/2] commit: allow editing notes in commit message editor Jeff King
2011-03-08  9:15           ` Johan Herland
2011-03-08 12:39         ` [RFC/PATCH] commit notes workflow Michel Lespinasse
2011-03-02  7:01     ` Chris Packham
2011-03-02 12:45       ` Drew Northup
2011-03-02 16:24       ` Piotr Krukowiecki
2011-02-25 18:59 ` Junio C Hamano
2011-02-25 20:30 ` Drew Northup
2011-03-01 22:00   ` Jeff King
2011-03-01 22:18     ` Drew Northup
2011-03-01 22:23       ` Jeff King
2011-03-01 22:26         ` Drew Northup
2011-02-27 14:31 ` Michael J Gruber [this message]
2011-03-01 22:01   ` Jeff King
2011-03-09  8:13 ` Yann Dirson

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=4D6A6056.20201@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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).