Re: [PATCH v3 6/6] doc/git-commit: add documentation for fixup=[amend|reword] options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 3 Mar 2021 at 13:48, Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote:
>
[...]
> By the way, now that you explained in the other thread that "short"
> prefix-matching of "amend" and "reword" are allowed, I realize that
> the documentation doesn't mention it (or at least I don't remember
> reading it).
>

Yes, I admit it was not included. I will add it too.

> (Nevertheless, I still feel uncomfortable about supporting short
> prefix-matching in the initial implementation without any evidence
> that users will demand it, since we can't change that decision once
> it's in the hands of users.)
>

I am not sure about strong evidence but I tried to keep the major
points discussed earlier, as mentioned in the previous thread. Also I
think otherwise the short prefix will ease out / shorten the command
to prepare the "amend!" and also mirrors the commands in interactive
rebase.

> > > > +       When the commit log message begins with "squash! ..." (or "fixup! ..."
> > > > +       or "amend! ..."), and there is already a commit in the todo list that
> > >
> > > Should this also be mentioning `reword!`?
> >
> > No, as both `amend` and `reword` suboptions create "amend!" commit
> > only. I think it seems a bit confusing but I will try another attempt
> > to reword the document.
>
> Hmm, I see. So "reword!" is really just an "amend!" with only commit
> message but no patch content. That makes perfect sense from an
> implementation standpoint, but it makes me wonder if it would be
> easier for users to understand if it created a "reword!" commit which
> would be recognized as an alias of "amend!". (But maybe that's getting
> too confusing, and my musing should be ignored.)
>

Yes, we didn't choose to make "reword!" commit because if we do so
then again it would be expected to implicitly change 'pick' command to
'reword' in sequencer/ rebase to-do list when combined with 'git
rebase -- autosquash'. But here we are changing 'pick' to ' fixup -C'
to fulfill the working. So, we decided to create a variant of
'--fixup' and serve it as "amend!" commit.

> This also answers an unasked question I had regarding the duplicate
> "amend! amend!" check. I was wondering why it wasn't also checking for
> "reword! reword!".

Yes, it's true.

Thanks for the reveiws, I will add the above mentioned changes too.

Thanks and Regards,
Charvi



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux