Skip to content

Fix: autosquash command (r f) bug is fixed.#1880

Merged
CKolkey merged 1 commit intoNeogitOrg:masterfrom
swnakamura:feat/fix-autosquash
Mar 25, 2026
Merged

Fix: autosquash command (r f) bug is fixed.#1880
CKolkey merged 1 commit intoNeogitOrg:masterfrom
swnakamura:feat/fix-autosquash

Conversation

@swnakamura
Copy link
Copy Markdown
Contributor

@swnakamura swnakamura commented Dec 17, 2025

When r f is pressed, obtain the parent of currently specified commit as new base and run a interactive (autosquashing) rebase onto the commit.
Currently, there's a bug that deletes the rebased commits (#1620). This PR fixes it.

base,
util.deduplicate(util.merge(popup:get_arguments(), { "--autosquash", "--keep-empty" }))
)
git.rebase.rebase_interactive(base, args)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it even necessary to bring up the interactive editor view for this?

I think it would be even more convenient if this used the git.rebase.instantly path (similar to instant fixup).

Copy link
Copy Markdown
Contributor Author

@swnakamura swnakamura Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the comment.
According to @loqusion, Magit runs git … rebase -i --root --autosquash --keep-empty --autostash when running r f, so I followed its behavior to show an interactive editor.

@swnakamura swnakamura force-pushed the feat/fix-autosquash branch from 6b0e0d4 to 1e9e6c0 Compare March 3, 2026 19:02
Obtain new base as the parent of currently specified commit, and run
a interactive (autosquashing) rebase onto the commit.
@swnakamura swnakamura force-pushed the feat/fix-autosquash branch from 1e9e6c0 to 47f9c14 Compare March 24, 2026 23:51
@CKolkey CKolkey merged commit f63c186 into NeogitOrg:master Mar 25, 2026
6 checks passed
@swnakamura swnakamura deleted the feat/fix-autosquash branch March 25, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants