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]

 



Eric Sunshine <sunshine@xxxxxxxxxxxxxx> writes:

>> 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.)

Perhaps related, perhaps not, but I wonder if we really need --fixup=amend
and --fixup=reword to begin with.  The "amend" variant,

    $ git commit --fixup=amend:<original> ... other args ...

is about shaping the index with "other args" and recording the
resulting tree with the log message taken from <original>, marked
with the "amend!" prefix.  The --fixup=reword:<original> variant
is a mere special case of it where the recorded tree is made of the
index in the same way as a partial commit with pathspec that matches
no paths, i.e.  If you have --fixup=amend, you can do

    $ git commit --fixup=amend:<original> --only

and you do not need --fixup=reword:<original> at all, no?





[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