git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 3/3] commit: add an option the reword HEAD

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 24, 2020, 16:58 UTC
Message-ID
<xmqqft77glhn.fsf@gitster.c.googlers.com>
In-Reply-To
<95cc6fb2-d1bc-11de-febe-c2b5c78a6850@gmail.com>
Phillip Wood <phillip.wood123@gmail.com> writes:
Show 14 quoted lines
>>> I don't think this patch series stops us implementing something for rebase but
>>> it would mean we couldn't use the name reword! unless we allow `git commit
>>> --reword` to take an optional commit which I'm not that keen on.
>>>
>>> What do you think to an alternative name?
>> I am really worried that the proliferation of confusingly similar
>> options
>> will increase Git's reputation for being awfully hard to use.
> ...
> The reason I'm not keen on having --amend or --reword take an optional
> commit is that I think it is confusing as it means sometimes that
> option creates a new commit and sometimes it modifies the last commit 
> furthermore passing --reword=HEAD would not reword HEAD but creates a
> reword! commit.

Adding just another subjective view to the two already presented, but I think --reword, as presented by Phillip, sits better next to the existing --amend.

I wonder if we can extend the existing "--fixup <commit>" (and perhaps "--squash <commit>") to make them work better with the workflow Dscho envisions? Explicit presence of the "-e" option might be a way to tell the command to behave differently from the current "--fixup" and to leave a mark that is different from 'fixup!" in the resulting commit to affect the later "rebase" step as well, for example.

Previous: Phillip WoodNext: Phillip Wood via GitGitGadget
Message 15 of 21 in “commit: add an option to reword the last commit”
  1. 0/3 commit: add an option to reword the last commitPhillip Wood via GitGitGadget, Sep 21, 2020
  2. 3/3 commit: add an option the reword HEADPhillip Wood via GitGitGadget, Sep 21, 2020
  3. Eric SunshineSep 21, 2020
  4. Phillip WoodSep 21, 2020
  5. Eric SunshineSep 21, 2020
  6. Junio C HamanoSep 21, 2020
  7. Phillip WoodSep 22, 2020
  8. Junio C HamanoSep 22, 2020
  9. Christian CouderSep 21, 2020
  10. Phillip WoodSep 21, 2020
  11. Johannes SchindelinSep 23, 2020
  12. Phillip WoodSep 23, 2020
  13. Johannes SchindelinSep 23, 2020
  14. Phillip WoodSep 24, 2020
  15. Junio C HamanoSep 24, 2020
  16. 1/3 commit docs: use backquotes when quoting optionsPhillip Wood via GitGitGadget, Sep 21, 2020
  17. 2/3 commit: reorder synopsisPhillip Wood via GitGitGadget, Sep 21, 2020
  18. Junio C HamanoSep 22, 2020
  19. Phillip WoodSep 22, 2020
  20. Junio C HamanoSep 22, 2020
  21. Junio C HamanoSep 21, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.