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

Re: [PATCH] commit: restore --edit when combined with --fixup

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Aug 11, 2021, 23:27 UTC
Message-ID
<YRRc1PDpSOmd4sEY@camp.crustytoothpaste.net>
In-Reply-To
<127626db-302e-426c-a158-35f46205e1d6@www.fastmail.com>
On 2021-08-11 at 22:10:28, Joel Klinghed wrote:
Show 6 quoted lines
> At my work we use "fixup!" when pushing fixes to a review, using
> the modified body to outline what issue the commit is addressing,
> helping the reviewers to see intent and not just the end result.
> All "fixup!" are then ofc. squashed before integration.
> Same can be achieved with -m but --edit is generally
> easier to work with in my experience.

Yeah, I do exactly the same thing. I want to write a nice explanation of the change I made for the reviewer, but I don't want to preserve it for the future.

I recently had a series that was 33 commits after squashing but with 117 before squashing, thanks to a series of very thorough and thoughtful reviews, so in this kind of scenario, it can really be kind to the reviewer to help them match up the change with their comment.

Show 5 quoted lines
> I've also once or twice used it to avoid a "fixup!" of a "fixup!" instead
> of looking up the original target commit hash but that's just me being
> lazy.
> 
> I'll add a test to check for previous behavior.
Thanks for catching this.
-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA
Previous: Jeff KingNext: Joel Klinghed via GitGitGadget
Message 5 of 19 in “commit: restore --edit when combined with --fixup”
  1. commit: restore --edit when combined with --fixupJoel Klinghed via GitGitGadget, Aug 11, 2021
  2. Jeff KingAug 11, 2021
  3. Joel KlinghedAug 11, 2021
  4. Jeff KingAug 11, 2021
  5. brian m. carlsonAug 11, 2021
  6. commit: restore --edit when combined with --fixupJoel Klinghed via GitGitGadget, Aug 11, 2021
  7. Junio C HamanoAug 12, 2021
  8. Joel KlinghedAug 12, 2021
  9. Junio C HamanoAug 12, 2021
  10. commit: restore --edit when combined with --fixupJoel Klinghed via GitGitGadget, Aug 12, 2021
  11. Phillip WoodAug 12, 2021
  12. Joel KlinghedAug 12, 2021
  13. Phillip WoodAug 13, 2021
  14. Joel KlinghedAug 13, 2021
  15. Phillip WoodAug 14, 2021
  16. Joel KlinghedAug 14, 2021
  17. commit: restore --edit when combined with --fixupJoel Klinghed via GitGitGadget, Aug 12, 2021
  18. commit: restore --edit when combined with --fixupJoel Klinghed via GitGitGadget, Aug 14, 2021
  19. Phillip WoodAug 17, 2021

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.