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

Re: Feature Request: Interactively pick fixup revision

From
KHKristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
Date
Nov 9, 2024, 17:13 UTC
Message-ID
<debabf92-7d23-4d17-bb0e-36691c94430a@app.fastmail.com>
In-Reply-To
<D5HQH12Y4SWF.2W70SKEDB7HBF@cepl.eu>
On Sat, Nov 9, 2024, at 15:55, Matěj Cepl wrote:
Show 14 quoted lines
> On Sat Nov 9, 2024 at 12:41 PM CET, Martin Imre wrote:
>> My usual workflow is using `git commit --fixup <revision>` quite
>> frequently, as it eases the code reviewing process and allows for a
>> clean history later on.
>
> https://github.com/keis/git-fixup/
>
> but at least as a minimal improvement, I would limit list of
> commits to those which are touched in the staging area:
>
>   ref=$(git log --oneline -- $(git diff --cached|lsdiff --strip
> 1)|fzf|cut -d ' ' -f1)
>
> (lsdiff is from patchutils)

This or git-absorb(1) (I have only tried the latter) is good if you want to fixup previously touched lines. That is likely to be the case for a fixup command. But maybe you for example want to add a test to some change which is in a different file. In which case you want to pick the commit manually.

I haven’t heard of lsdiff(1) though. That’s something I have been wanting lately. Thanks.

-- 
Kristoffer Haugsbakk
Previous: Matěj CeplNext: Matěj Cepl
Message 5 of 12 in “Feature Request: Interactively pick fixup revision”
  1. Martin ImreNov 9, 2024
  2. rsbecker@nexbridge.comNov 9, 2024
  3. Martin ImreNov 9, 2024
  4. Matěj CeplNov 9, 2024
  5. Kristoffer HaugsbakkNov 9, 2024
  6. Matěj CeplNov 9, 2024
  7. Martin ImreNov 10, 2024
  8. Kristoffer HaugsbakkNov 10, 2024
  9. Stefan HallerNov 10, 2024
  10. Matěj CeplNov 11, 2024
  11. Oswald BuddenhagenNov 16, 2024
  12. Kristoffer HaugsbakkNov 9, 2024

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.