From: Jonathan Nieder <jrnieder@gmail.com>
To: Ralf Thielow <ralf.thielow@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH] commit: make default of "cleanup" option configurable
Date: Tue, 8 Jan 2013 23:29:52 -0800 [thread overview]
Message-ID: <20130109072952.GC6503@elie.Belkin> (raw)
In-Reply-To: <1357676176-30019-1-git-send-email-ralf.thielow@gmail.com>
Hi,
Ralf Thielow wrote:
> The default of the "cleanup" option in "git commit"
> is not configurable. Users who don't want to use the
> default have to pass this option on every commit since
> there's no way to configure it.
Could you give an example? I'm trying to get a sense of whether these
habitual --cleanup= passers would use --cleanup=verbatim or
--cleanup=strip.
I'm a bit worried that a setting like 'commit.cleanup = strip' would
be likely to break scripts. Yes, scripts using "git commit" instead
of commit-tree while caring about detailed semantics are asking for
trouble, but I'm worried about importers, for example, which are
sometimes written by new git users. Some scripts might assume that
"git commit" preserves the entire change description from their source
data, even when some lines happen to start by listing the ways the
author is #1.
I don't think that necessarily rules out this change, but:
1. We need more of an explanation of the purpose than "this lets
people type less". What workflow does setting this option fit
into?
2. I would prefer to see a little thought about whether it's possible
to avoid silently impacting scripts. E.g., depending on the
answer to (1), maybe supporting "verbatim" but not "strip" would be
ok? Or alternatively, maybe a search of public code repositories
would reveal that new git users tend to write their importers in a
way that this doesn't break.
As a side effect, the information gathered to answer (1) and (2) could
have the potential to make the user-level documentation more useful,
by adding context to the description of the configuration item.
[...]
> --- a/builtin/commit.c
> +++ b/builtin/commit.c
> @@ -103,7 +103,7 @@ static enum {
> CLEANUP_NONE,
> CLEANUP_ALL
> } cleanup_mode;
> -static char *cleanup_arg;
> +const static char *cleanup_arg;
Style nit: storage class comes first, then the type. Otherwise the
typename "const char *" is split up.
Hope that helps,
Jonathan
next prev parent reply other threads:[~2013-01-09 7:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-08 20:16 [PATCH] commit: make default of "cleanup" option configurable Ralf Thielow
2013-01-08 21:18 ` Junio C Hamano
2013-01-09 7:29 ` Jonathan Nieder [this message]
2013-01-09 8:16 ` Ralf Thielow
2013-01-09 8:28 ` Jonathan Nieder
2013-01-09 15:40 ` Junio C Hamano
2013-01-09 15:56 ` Junio C Hamano
2013-01-10 19:37 ` Re* " Junio C Hamano
2013-01-15 18:50 ` [PATCH] Allow custom "comment char" Ralf Thielow
2013-01-15 19:12 ` Junio C Hamano
2013-01-16 6:23 ` Junio C Hamano
2013-01-16 8:17 ` Ralf Thielow
2013-01-16 19:18 ` [PATCH v2] " Ralf Thielow
2013-01-16 20:30 ` Junio C Hamano
2013-01-16 21:02 ` Jens Lehmann
2013-01-09 19:36 ` [PATCHv2] commit: make default of "cleanup" option configurable Ralf Thielow
2013-01-10 0:17 ` Junio C Hamano
2013-01-10 17:45 ` [PATCHv3] " Ralf Thielow
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=20130109072952.GC6503@elie.Belkin \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ralf.thielow@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;
as well as URLs for NNTP newsgroup(s).