git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rasmus Villemoes <rv@rasmusvillemoes.dk>
To: Junio C Hamano <gitster@pobox.com>,
	Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Cc: Git Mailing List <git@vger.kernel.org>,
	Luca Ceresoli <luca.ceresoli@bootlin.com>
Subject: Re: forcing an in-body From header
Date: Mon, 29 Aug 2022 13:56:58 +0200	[thread overview]
Message-ID: <f07a2387-dbbc-fd13-9817-069767c75165@rasmusvillemoes.dk> (raw)
In-Reply-To: <xmqqo7w6yl8y.fsf@gitster.g>

On 26/08/2022 19.20, Junio C Hamano wrote:
> Konstantin Ryabitsev <konstantin@linuxfoundation.org> writes:
> 
>> I agree that it's a nice feature to have, though I would put this into the
>> sendemail config instead of using an env variable, something like:
>>
>>     [sendemail]
>>       in-body-headers = From
> 
> A change only for send-email does sound quite attractive.
> 
> I encourage folks to run format-patch first, make amends as needed
> in the output files, proofread the result once again, all before
> finally handing it to send-email for sending out. 

That's at least my usual workflow, yes.

 If a "force
> in-body headers" command line option plus a configuration variable
> added to "git send-email" would work for them, I would be OK with
> such a change.

It would work for me, except that if I am to rely on git send-email to
munge the body of the file(s) I pass to it, I'd really like a way for
--dry-run to reassure me that that will actually happen. Currently that
only prints the headers, which is quite useful to check that the To and
Cc are as expected (especially when one has some to-cmd or cc-cmd
configured).

> There may be folks who do not use "git send-email" to send out their
> patches, and a change to "git format-patch" may help them, though.

Maybe, yes. I also stumbled on this paragraph in git format-patch --help
which would probably need some adjustment

           Note that this option is only useful if you are actually
sending the
           emails and want to identify yourself as the sender, but
retain the
           original author (and git am will correctly pick up the in-body
           header). Note also that git send-email already handles this
           transformation for you, and this option should not be used if
you are
           feeding the result to git send-email.

I don't know how git send-email behaves if there already is an in-body
From, or if it is different than the one that send-email was about to
add itself.

Somehow I got the cover letter of the mini-series, but neither of the
two actual patches. I can't answer the big-picture question of whether
this belongs in format-patch, send-email or both, but:

> * Should it be "inbody" or "in-body"?

in-body, I think.

> * Should it have a corresponding configuration variable?

Most definitely yes, it's something I'd want to set for certain projects
in the local .git/config file, and not a command line option I want to
have to remember when doing the occasional contribution for those projects.

Thanks for the quick responses and initial draft work on this.

Rasmus

  reply	other threads:[~2022-08-29 12:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-26 13:17 forcing an in-body From header Rasmus Villemoes
2022-08-26 16:48 ` Konstantin Ryabitsev
2022-08-26 17:20   ` Junio C Hamano
2022-08-29 11:56     ` Rasmus Villemoes [this message]
2022-08-26 17:11 ` Junio C Hamano

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=f07a2387-dbbc-fd13-9817-069767c75165@rasmusvillemoes.dk \
    --to=rv@rasmusvillemoes.dk \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=konstantin@linuxfoundation.org \
    --cc=luca.ceresoli@bootlin.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 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).