git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: hukeping <hukeping@huawei.com>
Cc: "Git List" <git@vger.kernel.org>,
	"Eric Sunshine" <sunshine@sunshineco.com>,
	"Zhengjunling (JRing, Task Force)" <zhengjunling@huawei.com>,
	zhuangbiaowei <zhuangbiaowei@huawei.com>,
	"Patrick Hemmer" <git@stormcloud9.net>,
	"Rafael Ascensao" <rafa.almas@gmail.com>,
	"René Scharfe" <l.s.r@web.de>, "Jeff King" <peff@peff.net>
Subject: Re: [PATCH v2] format-patch: make output filename configurable
Date: Mon, 09 Nov 2020 21:40:55 -0800	[thread overview]
Message-ID: <xmqqk0ut93bs.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <8b97c61e983c432aab1063912d6266b9@huawei.com> (hukeping@huawei.com's message of "Tue, 10 Nov 2020 04:44:21 +0000")

hukeping <hukeping@huawei.com> writes:

>>> Does it worth to add a new configuration variable for this or just a
>>> hard-coded value is enough?
>>
>>I personally would say "yes, the current code that limits to 64 is enough", but you,
>>as the person who said that you do not like the current hard-coded value, are not
>>in the position to ask that question, I would have to say---if it were enough for
>>you, you wouldn't have complained about 64 in the first place ;-)
>
> The original motivation is to lengthening the limit because of
> file name truncated problem, so update the value to a larger one
> seems like the simplest way for me.

It actually would be an improvement to me if we shorten the current
hardcoded limit.  In fact, 64 is still a bit too long to fit in
dired buffer and raising the limit will make it even worse.

In other words, you are forgetting that a larger limit is not always
a better limit.

I am not saying that between my wish to keep 64 as near optimal (and
possibly make it shorter) and your wish to make it longer to avoid
truncation, the former wish is more important than the latter.  The
former however is at least as important as the latter [*1*].

And once you realize that one hardcoded limit never is ideal for
everybody, you wouldn't even dream to suggest that raising the limit
to another hardcoded value is better. Adding a configuration knob is
a way to treat people with respect and give them choice to suit the
system to their taste.

The names of output files from format-patch is a very local matter,
because once it is fed to "git send-email", the receiving end does
not even care how many letters you used for your filename---after
all, you may not have used an intermediate file at all.  It is a
good place to give personal choice, as opposed to parts of the
system where interaction among multiple people happens (e.g. we
wouldn't dream of making the characters allowed in refnames
configurable---that would cause chaos between hosting sites and
fetchers), where we give more careful thought before making things
configurable in order to avoid fracturing the ecosystem.

Thanks.


[Footnote]

*1* ... exactly because we know that most users who used Git in the
past 15 years were happy with the current limit as we haven't seen
much complaint until your patch.  We cannot tell if they wanted the
limit to be shorter, or longer, though.


      reply	other threads:[~2020-11-10  5:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-05 20:15 [PATCH] Lengthening FORMAT_PATCH_NAME_MAX to 80 Hu Keping
2020-11-05 15:01 ` Jeff King
2020-11-05 21:16   ` Junio C Hamano
2020-11-06  8:51     ` hukeping
2020-11-06 17:45       ` Junio C Hamano
2020-11-06 20:50     ` Junio C Hamano
2020-11-06 21:56       ` [PATCH] format-patch: make output filename configurable Junio C Hamano
2020-11-06 22:05         ` Eric Sunshine
2020-11-09 19:23           ` [PATCH v2] " Junio C Hamano
2020-11-10  0:23             ` Jeff King
2020-11-10  1:43               ` Junio C Hamano
2020-11-10  2:31             ` hukeping
2020-11-10  2:37               ` Junio C Hamano
2020-11-10  4:44                 ` hukeping
2020-11-10  5:40                   ` Junio C Hamano [this message]

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=xmqqk0ut93bs.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@stormcloud9.net \
    --cc=git@vger.kernel.org \
    --cc=hukeping@huawei.com \
    --cc=l.s.r@web.de \
    --cc=peff@peff.net \
    --cc=rafa.almas@gmail.com \
    --cc=sunshine@sunshineco.com \
    --cc=zhengjunling@huawei.com \
    --cc=zhuangbiaowei@huawei.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).