From: tytso <tytso@mit.edu>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: "Tao Klerks" <tao@klerks.biz>,
"Michal Suchánek" <msuchanek@suse.de>,
rsbecker@nexbridge.com,
"brian m. carlson" <sandals@crustytoothpaste.net>,
jurgen_gjoncari@icloud.com, git@vger.kernel.org
Subject: Re: Make commit messages optional
Date: Mon, 11 Apr 2022 14:23:25 -0400 [thread overview]
Message-ID: <YlRyHR5rvG5P/Acr@mit.edu> (raw)
In-Reply-To: <220411.861qy3khkk.gmgdl@evledraar.gmail.com>
On Mon, Apr 11, 2022 at 12:19:51PM +0200, Ævar Arnfjörð Bjarmason wrote:
> > and the main argument *against* is "for most
> > people (non-advanced users), what you do initially is what you end up
> > pushing, or at least trying to push, and fixing things later is *hard*
> > - it requires a much deeper understanding of git than most people
> > otherwise necessarily need to develop".
>
> Yes, maybe it won't be viable to go in that direction, but re this in my
> [1]:
>
> But I'm also pretty sure that those people are engaged in a proxy war,
> and we should just attack the "problem" directly instead. I.e. it's not
> a problem that some commit somewhere has an empty message, rather it's
> that such a commit gets "propagated". A better place to check for it is
> then at the point of point of propagation.
So possible options we could consider:
1) Do nothing. If users want to override the current behavior they
can just put in their .git/config or ~/.gitconfig file:
[alias]
commit = commit --allow-empty-message
2) Add some kind of explicit git-config option which could then be
added to their .git/config or ~/.gitconfig:
[commit]
allow-empty-description = true
3) Change the default, so that --allow-empty-message is always
implied, and hope that novices can figure out git rebase -i without
shooting themselves in the foot.
4) Enforce git push doesn't push commits with empty commits,
implemented on the client side. This could be implemented via a
pre-push hook script.
5) Enforce git push doesn't push commits with empty commits,
implemented on the server side.This could be implemented via a
pre-receive hook script.
I will note that only options 2 and 3 require source code changes to
git. The rest can effectively be done via config file changes; for
the hook files, we could provide example scripts to make it easier for
people to choose that particular option.
And of these options, only one option, #3, requires imposing someone's
preference (which does appear to be in the minority) on everyone
else.
- Ted
next prev parent reply other threads:[~2022-04-11 18:24 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-08 3:35 Make commit messages optional jurgen_gjoncari
2022-04-08 8:02 ` Christian Couder
2022-04-08 11:26 ` Ævar Arnfjörð Bjarmason
2022-04-08 19:25 ` Erik Cervin Edin
2022-04-11 10:24 ` Ævar Arnfjörð Bjarmason
2022-04-11 17:59 ` Junio C Hamano
2022-04-11 18:18 ` Michal Suchánek
2022-04-11 21:09 ` Junio C Hamano
2022-04-08 8:15 ` Philip Oakley
2022-04-08 14:32 ` Phillip Susi
2022-04-08 22:30 ` brian m. carlson
2022-04-08 23:32 ` rsbecker
2022-04-09 11:32 ` Michal Suchánek
2022-04-10 13:59 ` Tao Klerks
2022-04-10 15:00 ` rsbecker
2022-04-10 15:18 ` rsbecker
2022-04-10 16:27 ` Tao Klerks
2022-04-13 5:40 ` Jonathan Nieder
2022-04-11 9:04 ` demerphq
2022-04-11 11:35 ` rsbecker
2022-04-11 10:19 ` Ævar Arnfjörð Bjarmason
2022-04-11 12:39 ` Tao Klerks
2022-04-11 18:09 ` Junio C Hamano
2022-04-11 18:15 ` Michal Suchánek
2022-04-11 18:23 ` tytso [this message]
2022-04-11 20:10 ` Ævar Arnfjörð Bjarmason
2022-04-14 14:46 ` Theodore Ts'o
2022-04-14 16:43 ` Ævar Arnfjörð Bjarmason
2022-04-14 17:25 ` 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
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=YlRyHR5rvG5P/Acr@mit.edu \
--to=tytso@mit.edu \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=jurgen_gjoncari@icloud.com \
--cc=msuchanek@suse.de \
--cc=rsbecker@nexbridge.com \
--cc=sandals@crustytoothpaste.net \
--cc=tao@klerks.biz \
/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).