From: Jeff King <peff@peff.net>
To: Johan Herland <johan@herland.net>
Cc: git@vger.kernel.org
Subject: Re: [RFC/PATCH] commit notes workflow
Date: Mon, 7 Mar 2011 18:39:02 -0500 [thread overview]
Message-ID: <20110307233902.GA20447@sigill.intra.peff.net> (raw)
In-Reply-To: <201103020121.54690.johan@herland.net>
On Wed, Mar 02, 2011 at 01:21:54AM +0100, Johan Herland wrote:
> Just grepping through a "git log" from git.git master, I can find one
> almost-false-positive in b6b84d1 ("---" appears slightly indented), and
> grepping through linux-2.6 master, I find plenty potential for false
> positives:
>
> a2d49358ba9bc93204dc001d5568c5bdb299b77d (almost false positive)
> 20cbd3e120a0c20bebe420e1fed0e816730bb988 (almost false positive)
> 68845cb2c82275efd7390026bba70c320ca6ef86 (false positive)
> 5e553110f27ff77591ec7305c6216ad6949f7a95 (false positive)
> 9638d89a75776abc614c29cdeece0cc874ea2a4c (false positive)
There is actually one false positive in git.git (1dfcfbc), but it looks
like a broken commit message in the first place (IOW, "---" _was_
special here, and it got broken during application). It appears many
times in linux-2.6, but in most I examined it looks like a similar case:
it _should_ have been removed during git-am or equivalent, but for some
reason was not, and the result is "---" cruft at the bottom of the
message, or sometimes a bunch of irrelevant patch text stuck in the
message.
The ones you mentioned are indeed false positives. I wonder if linux-2.6
is really a good repo to look at, though. Screwups aside, many patch
applications are happening using "git am", so of course we wouldn't see
the true number of false positives, as they were already mangled before
they made it into the repo.
> Remember that developers sometimes cut-n-paste output from other programs
> (debug sessions, performance benchmarks, etc.) into their commit message,
> and that makes a false positive a lot more likely to slip through.
Yeah, that's my biggest concern. I just really foresee myself getting
annoyed by typing "--- nOtes ---", or "-- Notes ---". It's just a few
characters shorter, but "---" is really less error prone.
> > Or maybe the divider should be configurable and default to something
> > long. But clueful people can set it to "---". That kind of seems like
> > overkill, though.
>
> Not sure that would help. I consider myself "clueful" enough that I'd likely
> set it to "---", but I also know myself well enough that if I pasted some
> debug/performance output into a commit message, and that output happened to
> contain a "---", it would likely slip through...
I think you're arguing both sides here. Making it "---" is too
error-prone that we should make the decision on behalf of everyone to
choose something else. Yet if given the opportunity to make the
decision, you would choose "---"? :)
I am really leaning towards configurability. Somebody else pointed out
that we would probably want it translatable anyway, so we will have to
deal with an arbitrary string anyway.
> I find myself using -v every now and then, to just have the diff handy while
> I construct the commit message. Makes it easier to refer to function names,
> etc. in the commit message.
My new tests cover this (and --cleanup=verbatim leaving both intact).
> Indeed, the notes rewrite does not depend on the post-rewrite hook at all.
Yeah, I was thinking of the config you have to setup, which I had not
done before. The original patch actually did OK with it, but we created
useless extra "notes copy" commits on the notes ref which got
superseded. The new version just avoids the rewrite if we are doing an
edit.
So here's my new version. Still some work to be done, as noted in the
cover letter for 2/2.
[1/2]: notes: make expand_notes_ref globally accessible
[2/2]: commit: allow editing notes in commit message editor
-Peff
next prev parent reply other threads:[~2011-03-07 23:39 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 ` Jeff King [this message]
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
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=20110307233902.GA20447@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=johan@herland.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).