Re: Feature Request: Interactively pick fixup revision
- From
- Kristoffer 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