From: Junio C Hamano <gitster@pobox.com>
To: "Robin Jarry" <robin@jarry.cc>
Cc: <phillip.wood@dunelm.org.uk>, <git@vger.kernel.org>,
"Tim Culverhouse" <tim@timculverhouse.com>,
"Nicolas Dichtel" <nicolas.dichtel@6wind.com>,
"Bagas Sanjaya" <bagasdotme@gmail.com>,
"Eric Sunshine" <sunshine@sunshineco.com>
Subject: Re: [PATCH RESEND] hooks: add sendemail-validate-series
Date: Wed, 05 Apr 2023 14:49:44 -0700 [thread overview]
Message-ID: <xmqqwn2qt2x3.fsf@gitster.g> (raw)
In-Reply-To: <CROOKNR29PDV.1WIGA6219L1C6@ringo> (Robin Jarry's message of "Wed, 05 Apr 2023 10:31:28 +0200")
"Robin Jarry" <robin@jarry.cc> writes:
> Just a thought. Instead of adding another hook, wouldn't it be better to
> add an option --validate-series (git config sendemail.validateSeries)
> that would change the behaviour of the sendemail-validate hook? Calling
> it with all patch files as command line arguments only once instead of
> once per file.
I do not see much upside in doing so. Instead of having to write a
new validate-series hook script to store it under a new name, users
can update an existing validate-patch hook script to take a batch of
patches in one go. Then the user now has to set a new configuration
variable. Because the expected way to feed the hook script is *not*
per invocation but depends solely on how the script is written, a
command line option would not make much sense. Not having to rename
the updated validate-patch script to validate-series might be a
small win, but I do not think it is a compelling reason to take that
approach.
> I know I was concerned with the max size of the command line args but is
> there really a chance that we hit that maximum? On my system, it is
> 2097152 bytes. Even with a 1000 patches series with 1000 bytes
> filenames, we wouldn't hit the limit.
>
> This way, we support any crap filename that the user may send and we
> don't add a new hook which basically does the same thing than the
> existing one.
Between "we may exceed command line argument limit" (which by the
way is way lower on certain systems than what you expect, IIRC) and
"the user may throw us a file with LF in its name", I'd find it
simpler to punt on the latter and tell them "if it hurts, don't do
it". As long as the limitation is clearly documented, I'd say it is
OK.
Thanks.
next prev parent reply other threads:[~2023-04-05 21:49 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-02 18:56 [PATCH RESEND] hooks: add sendemail-validate-series Robin Jarry
2023-04-03 0:17 ` Eric Sunshine
2023-04-03 14:09 ` Phillip Wood
2023-04-03 14:32 ` Robin Jarry
2023-04-03 15:20 ` Phillip Wood
2023-04-03 15:42 ` Junio C Hamano
2023-04-03 17:25 ` Robin Jarry
2023-04-03 22:29 ` Robin Jarry
2023-04-03 22:52 ` Junio C Hamano
2023-04-03 22:59 ` Robin Jarry
2023-04-04 20:14 ` Junio C Hamano
2023-04-05 8:31 ` Robin Jarry
2023-04-05 21:49 ` Junio C Hamano [this message]
2023-04-05 23:13 ` [PATCH v2] " Robin Jarry
2023-04-06 8:56 ` Ævar Arnfjörð Bjarmason
2023-04-11 9:58 ` Phillip Wood
2023-04-11 10:39 ` Robin Jarry
2023-04-11 15:58 ` 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=xmqqwn2qt2x3.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=bagasdotme@gmail.com \
--cc=git@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=phillip.wood@dunelm.org.uk \
--cc=robin@jarry.cc \
--cc=sunshine@sunshineco.com \
--cc=tim@timculverhouse.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).