Re: [PATCH] commit: make default of "cleanup" option configurable
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Jan 9, 2013, 08:28 UTC
- Message-ID
- <20130109082858.GG6503@elie.Belkin>
- In-Reply-To
- <CAN0XMO+t2gu9UKJFVXAxt91-hUUhMqqmMoop88KYp0vo3x6c_g@mail.gmail.com>
Ralf Thielow wrote:
Show 6 quoted lines
> It's actually my own usecase :). The bugtracker I'm using is able > to create relationships between issues and related commits. It > expects that a part of the commit message contains the issue number > in format "#<issueId>". So I need to use a cleanup mode different > from "default" to keep the commentary. The mode I'd use is "whitespace", > "verbatim" is also possible.
Hm, so "whitespace-when-editing" would be the ideal setting.
Would it be confusing if the '[commit] cleanup' setting only took effect when launching an editor (and not with -F, -C, or -m)? My first impression is that I'd like that behavior better, even though it's harder to explain.
[...]
> When a user uses a script/importer which expects that the "default" option > is used without setting it explicitly, and then the user changes the default, > isn't it the users fault if that would break things?
Consider the following series of events.
1. My friend writes an importer that uses the "git commit" command.
I like it and start using it. 2. Another friend writes a blog post about the '[commit] cleanup'
setting. I like it and start using it.3. I try to use the importer again.
4. Years later, I notice the commit messages are corrupted in the
imported history.It's hard to assign blame. I guess it's my fault. ;)
[...]
> I'll add a sentence of my bugtracker example to it. I think many developers > are using such a tool, so it'd makes sense.
Thanks, sounds good.
Regards, Jonathan