git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
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: Sat, 25 Jul 2015 10:18:45 -0700	[thread overview]
Message-ID: <xmqqlhe4jgui.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20150725014722.GA17830@peff.net> (Jeff King's message of "Fri, 24 Jul 2015 18:47:23 -0700")

Jeff King <peff@peff.net> writes:

> This works for "format-patch -s". But I guess that leaves open the
> question of "commit --signoff". It should not matter when making a
> commit new (after all, you have not yet had a chance to put the "---"
> in). But something like "git commit --amend --signoff" might want to
> handle it. Of course we have no idea if any "---" we find there is meant
> to be an email notes-separator by the user, or if they happened to use
> "---" for something else[1] (which is a bad idea if you have an emailed
> patches workflow, but many people do not). So it's a bit riskier.
>
> -Peff
>
> [1] While reading the old "git commit --notes" thread recently, Johan
>     Herland gave a plausible confusing example:
>
>     ...
>       Why
>       ---
>
>       To show that "---" can be part of a commit message. :)

That is all true, but such a commit already is problematic when used
as an input to "am", regardless of where the sign-off goes.  With or
without our change, the intended explanation of "why" part will be
missing from the resulting commit at the receiving end.  The only
difference your change makes is that the resulting truncated log
message at least will have a sign-off, albeit at a place that the
user did not intend to put it.

We could invent a new and more prominent delimiter, teach
"format-patch" to add that between the log and patch if and only if
the log has a three-dashes line in it (with an option to override
that "if and only if" default), and teach "mailsplit" to pay
attention to it.  People who are relying on the fact that a
three-dashes line in the local log message will be stripped off at
the receiving end have to pass that "The commit has three-dash in it
as a cut-mark on purpose; don't add that prominent delimiter" option
when formatting their patches out for submission.

But I somehow think it is not worth the effort.  It is fairly well
established that three-dash lines are cut marks and Johan's example
log message above deliberately violates only to spite itself.  My
knee-jerk advice is that people can just rephrase s/Why/Reason/ and
be done with it.

I dunno.

  reply	other threads:[~2015-07-25 17: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
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 [this message]
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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqlhe4jgui.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=josharian@gmail.com \
    --cc=peff@peff.net \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).