git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Matheus Tavares <matheus.bernardino@usp.br>
Cc: Phillip Wood <phillip.wood123@gmail.com>,
	git@vger.kernel.org, avarab@gmail.com, l.s.r@web.de
Subject: Re: [PATCH v2 2/2] format-patch: warn if commit msg contains a patch delimiter
Date: Fri, 09 Sep 2022 09:47:43 -0700	[thread overview]
Message-ID: <xmqqwnaclck0.fsf@gitster.g> (raw)
In-Reply-To: <CAHd-oW4Z-UbFWy=fj=L-CqiG9QP0x3ZLRg0icgK5Xgu=THd4Lw@mail.gmail.com> (Matheus Tavares's message of "Thu, 8 Sep 2022 22:08:19 -0300")

Matheus Tavares <matheus.bernardino@usp.br> writes:

> Makes sense. Perhaps under a config option? The difficult part would
> be for the scissors; just indenting it with whitespaces wouldn't
> suffice, right?

It may be difficult not because of any mechanical reasons, but
because we cannot guess WHY the author wrote it there in the log in
the first place.  It could be that the author writes explanatory
text that is not to become part of the permanent history at the
beginning, place scissors, and follow that with log for posterity,
EXPECTING that all of them is output by format-patch and transmit to
the receiving end without modified.

Another thing is a three-dash marker line in the log message.  I
myself did use them to leave a note for myself (which should be left
outside the official history when it is sent to the list and then
applied), and I would have been upset if it was stripped or the tool
even warned against it---I knew what I was doing after all.

Compared to these two, an unindented "diff " and its output in the
log has no reason to be pre-recoded in the commit message and make
the rest of the message a part of the patch, so I am perfectly fine
if we unconditionally "escaped" them.  But I personally think
scissors and three-dash lines should be left intact.

  reply	other threads:[~2022-09-09 16:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-04 23:12 [PATCH] format-patch: warn if commit msg contains a patch delimiter Matheus Tavares
2022-09-05  8:01 ` Ævar Arnfjörð Bjarmason
2022-09-05 10:57   ` René Scharfe
2022-09-07 14:44   ` [PATCH v2 0/2] " Matheus Tavares
2022-09-07 14:44     ` [PATCH v2 1/2] patchbreak(), is_scissors_line(): work with a buf/len pair Matheus Tavares
2022-09-07 18:20       ` Phillip Wood
2022-09-08  0:35       ` Eric Sunshine
2022-09-07 14:44     ` [PATCH v2 2/2] format-patch: warn if commit msg contains a patch delimiter Matheus Tavares
2022-09-07 18:09       ` Phillip Wood
2022-09-07 18:36         ` Junio C Hamano
2022-09-09  1:08           ` Matheus Tavares
2022-09-09 16:47             ` Junio C Hamano [this message]
2022-09-07 17:44     ` [PATCH v2 0/2] " René Scharfe

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=xmqqwnaclck0.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=l.s.r@web.de \
    --cc=matheus.bernardino@usp.br \
    --cc=phillip.wood123@gmail.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).