Thread (55 messages) 55 messages, 3 authors, 2021-03-15

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

flat view

From: Eric Sunshine <hidden>
Date: 2021-03-04 00:23:08

On Wed, Mar 3, 2021 at 2:44 AM Charvi Mendiratta [off-list ref] wrote:
On Tue, 2 Mar 2021 at 12:09, Eric Sunshine [off-list ref] wrote:
quoted
On Mon, Mar 1, 2021 at 3:52 AM Charvi Mendiratta [off-list ref] wrote:
quoted
Signed-off-by: Charvi Mendiratta <redacted>
+       Without `amend:` or `reword:`, create a `fixup!` commit where
+       the commit message will be the subject line from the specified
+       commit with a prefix of "fixup!'". The resulting "fixup!" commit
+       is further used with `git rebase --autosquash` to fixup the
+       content of the specified commit.
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).

(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.)
quoted
quoted
+       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.)

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!".
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help