From: Jeff King <peff@peff.net>
To: Jacob Keller <jacob.keller@gmail.com>
Cc: Stefan Beller <sbeller@google.com>,
"git@vger.kernel.org" <git@vger.kernel.org>,
Josh Bleecher Snyder <josharian@gmail.com>
Subject: Re: [RFC/PATCH] log: add log.firstparent option
Date: Fri, 24 Jul 2015 01:17:54 -0700 [thread overview]
Message-ID: <20150724081753.GA29451@peff.net> (raw)
In-Reply-To: <CA+P7+xo11PwE+L3zCy8Nw=xt+ZWKadd_-ra7C-QvNV80B6dCGw@mail.gmail.com>
On Fri, Jul 24, 2015 at 12:46:57AM -0700, Jacob Keller wrote:
> On Fri, Jul 24, 2015 at 12:40 AM, Jeff King <peff@peff.net> wrote:
> > Whoops. Usually I "format-patch -s" and then add any notes while
> > sending. But the wifi at OSCON was so abysmal that instead I wrote the
> > notes directly into the commit message to send the whole thing later.
> > And of course format-patch is not smart enough to know that I meant
> > everything after the "---" as notes. :)
>
> Kind of a side track but...
>
> I think it's up to the caller of git-am to use "--scissors" to cut the
> log? But maybe we could add an option to git-format patch which
> formats and cuts via scissors as it generates the message? Not sure
> the best way to interpret this, but I know I've had trouble where I
> wrote some notes into an email and lost it because I killed the email
> for some other edit. Keeping them inside my local commits before
> sending out email would be handy.. hmmmm
The "---" is orthogonal to "--scissors". With "--scissors", the full
format of the body is:
some notes or cover letter
-- >8 --
the actual commit message
---
more notes
diff --git ...etc...
So here I was trying to use the "---" to add notes at the end (not
because --scissors is not used consistently, but because I wanted the
reader to see them after reading the commit message). So you could keep
notes in the commit message by writing:
my notes here
-- >8 --
the real commit message
and then "format-patch -s" just works, because it is munging the end.
But if you want to be able to add commit notes at the end, you need
format-patch to realize that any trailers should go before the "---"
(i.e., to realize that the "---" is syntactically significant, and not
just part of your message).
Another option would be to teach git-commit to split the "---" from the
commit message itself, and put the bits after it into git-notes (and
then format-patch already knows how to handle that). I had a patch
series to do that long ago, but I found that I never used it (I usually
_do_ type my notes in the mailer as I'm sending), so I never seriously
pushed for inclusion. I might be able to dig it out of the archive if
you're interested.
-Peff
next prev parent reply other threads:[~2015-07-24 8:18 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-23 1:23 [RFC/PATCH] log: add log.firstparent option Jeff King
2015-07-23 4:40 ` Config variables and scripting // was " David Aguilar
2015-07-23 5:14 ` Jeff King
2015-07-23 5:48 ` Jeff King
2015-07-23 6:32 ` Jacob Keller
2015-07-23 6:53 ` Jeff King
2015-07-23 6:55 ` Jacob Keller
2015-07-23 9:53 ` Michael J Gruber
2015-07-23 17:35 ` Jeff King
2015-07-23 17:37 ` Junio C Hamano
2015-07-23 22:14 ` Stefan Beller
2015-07-24 7:40 ` Jeff King
2015-07-24 7:46 ` Jacob Keller
2015-07-24 8:17 ` Jeff King [this message]
2015-07-24 15:31 ` Junio C Hamano
2015-07-25 1:36 ` Jeff King
2015-07-25 1:47 ` Jeff King
2015-07-25 17:18 ` Junio C Hamano
2015-07-27 4:43 ` Jeff King
2015-07-23 22:46 ` Junio C Hamano
2015-07-24 6:07 ` Jacob Keller
2015-07-24 7:34 ` Jeff King
2015-07-24 7:44 ` Jacob Keller
2015-07-24 15:04 ` Junio C Hamano
2015-07-24 18:13 ` Jeff King
2015-07-24 7:21 ` Jeff King
2015-07-24 7:23 ` Jeff King
2015-07-24 15:07 ` Junio C Hamano
2015-07-25 2:05 ` Jeff King
2015-07-25 17:41 ` Junio C Hamano
2015-07-25 22:41 ` Jacob Keller
2015-07-27 4:55 ` Jeff King
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=20150724081753.GA29451@peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=jacob.keller@gmail.com \
--cc=josharian@gmail.com \
--cc=sbeller@google.com \
/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.