git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Christoph Anton Mitterer <calestyo@scientia.net>
Subject: Re: [PATCH] sequencer: preserve commit messages
Date: Thu, 26 Feb 2015 12:05:27 +0100	[thread overview]
Message-ID: <54EEFDF7.8090306@drmicha.warpmail.net> (raw)
In-Reply-To: <xmqqoaohonpt.fsf@gitster.dls.corp.google.com>

Junio C Hamano venit, vidit, dixit 25.02.2015 19:22:
> Michael J Gruber <git@drmicha.warpmail.net> writes:
> 
>> Junio C Hamano venit, vidit, dixit 24.02.2015 19:29:
>>> Michael J Gruber <git@drmicha.warpmail.net> writes:
>>>
>>>>> Hmm, wouldn't it introduce a grave regression for users who
>>>>> explicitly ask to clean crufty messages up (by setting their own
>>>>> commit.cleanup configuration) if you unconditionally force
>>>>> "--cleanup=verbatim" here?
>>>>>
>>>>
>>>> That's what I meant by possible side-effects below.
>>>> ...
>>>> But git cherry-pick without conflict should no re-cleanup the commit
>>>> message either, should it?
>>>
>>> Hmm, but if it does not, wouldn't that countermand the wish of the
>>> user who explicitly asked to clean crufty messages up by setting
>>> their own commit.cleanup configuration?
>>
>> Note that "verbatim" is not the default - we cleanup commits even
>> without being asked to. And this makes sense for "git commit", of course.
> 
> I am fine with the result of the updated code if the user does not
> have anything in the config and uses the "default".  Not touching in
> "cherry-pick" would be more desirable than cleaning.  We are in
> agreement for that obvious case.

I didn't know we were. It's clear now.

> But your response is sidestepping my question, isn't it?

I simply misunderstood it.

> What does your change do to the user who wants that the clean-up to
> always happen and expresses that desire by setting
> commit.cleanup=strip in the config?  Doesn't the internal invocation
> of "commit --cleanup=verbatim" that is unconditional override it?
> 

Yes, it obviously overrides it.

I have to re-check which cleanups rebase does. I hope none.

But I would think that to clean up a commit message according to the
current config settings, a user should have to "commit --amend" or
"rebase -i with reword" explicitly.

I still think of rebase and cherry-picks as means to transplant a commit
as unchanged as possible.

Now, if there are conflicts and the user has to resolve them, they will
use "git commit" themselves with their current config in effect. That is
to be effected, and the user can use "git commit --cleanup=..." however
they want.

That leaves the case of "git cherry-pick --edit". I could easily catch
that and not overrride config in this case. But the user cannot
influence that other than by using "git -c commit.cleanup=...
cherry-pick --edit".

Hmm. With "--edit", current config being in effect should be expected,
right? So how about:

In case of no conflict: force cleanup=verbatim unless --edit is used?

Michael

  reply	other threads:[~2015-02-26 11:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-21 17:48 [BUG] git mangles up commit messages on rebase Christoph Anton Mitterer
2015-02-23 13:23 ` [PATCH] sequencer: preserve commit messages Michael J Gruber
2015-02-23 18:54   ` Junio C Hamano
2015-02-24 15:29     ` Michael J Gruber
2015-02-24 18:29       ` Junio C Hamano
2015-02-25  9:50         ` Michael J Gruber
2015-02-25 18:22           ` Junio C Hamano
2015-02-26 11:05             ` Michael J Gruber [this message]
2015-02-26 19:49               ` Junio C Hamano
2015-02-27 15:31                 ` Michael J Gruber
2015-02-27 18:31                   ` Junio C Hamano
2015-03-06 13:55                     ` [PATCHv2] " Michael J Gruber
2015-03-06 18:59                       ` Junio C Hamano
2015-02-25 13:44         ` [PATCH] " Christoph Anton Mitterer

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=54EEFDF7.8090306@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=calestyo@scientia.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).