Skip to content

fix: avoid false rebasing state from stale rebase dir#5359

Open
SergioChan wants to merge 2 commits intojesseduffield:masterfrom
SergioChan:fix-5184-stale-rebase-state
Open

fix: avoid false rebasing state from stale rebase dir#5359
SergioChan wants to merge 2 commits intojesseduffield:masterfrom
SergioChan:fix-5184-stale-rebase-state

Conversation

@SergioChan
Copy link

Summary

  • tighten rebase-state detection so Lazygit only reports rebasing when real rebase marker files exist
  • avoid treating a leftover .git/rebase-merge/ directory (without head-name) as an active rebase
  • add unit coverage for rebase-merge/head-name, rebase-apply/head-name, REBASE_HEAD, and stale-directory cases

Testing

  • go test ./pkg/commands/git_commands -run TestStatusCommandsIsInRebase

Fixes #5184

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.

Lazygit stuck in “Rebasing” state when .git/rebase-merge is partially written

1 participant