Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Harald Nordgren <haraldnordgren@gmail.com>
Cc: Harald Nordgren via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH] send-email: clarify missing subject error
Date: Mon, 10 Aug 2026 08:28:52 -0700	[thread overview]
Message-ID: <xmqqh5l26ll7.fsf@gitster.g> (raw)
In-Reply-To: <CAHwyqnVWgNThSPnPBVwOb11S9MSjD0R3BRg1ci6yEQR+Vn1kXg@mail.gmail.com> (Harald Nordgren's message of "Mon, 10 Aug 2026 11:48:07 +0200")

Harald Nordgren <haraldnordgren@gmail.com> writes:

>> An input file to the 'git send-email' program is often the output
>> of 'git format-patch'.  Such a file begins with a UNIX 'From '
>> line, followed by email headers such as 'From:', 'Date:', and
>> 'Subject:'.  The 'Subject:' line cannot be the first line of
>> the file in this case, yet it is a valid input.
>>
>> The only condition that this subroutine flags as an error is when
>> the file lacks a subject line.  "No 'Subject:' line in '%s'\n" is a
>> clear message to display and is an improvement over the original.
>>
>> However, the fact that the first line does not start with
>> "Subject:" is irrelevant to the basis of the subroutine's
>> decision to issue an error, I think.
>
> Yeah, that makes sense, so maybe we don't need to focus on it being
> the first line, but Subject needs to be there somewhere before the
> body.

Yeah, the curious thing is that the subroutine with the loop is
happy as long as it finds "^Subject: " somewhere, not necessarily
before the first blank line.

That is why I said "No 'Subject: ' line in '%s'\n" is clear enough
and an improvement over the original.  Anything else will add lie to
it.

Thanks.

  reply	other threads:[~2026-08-10 15:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-09  9:23 [PATCH] send-email: clarify missing subject error Harald Nordgren via GitGitGadget
2026-08-09 19:13 ` Junio C Hamano
2026-08-10  9:48   ` Harald Nordgren
2026-08-10 15:28     ` Junio C Hamano [this message]
2026-08-10 17:53 ` [PATCH v2] " Harald Nordgren via GitGitGadget
2026-08-10 21:09   ` 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=xmqqh5l26ll7.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=haraldnordgren@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox