Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support for old style non-interactive rebase #3348

Merged

Conversation

stefanhaller
Copy link
Collaborator

When doing a non-interactive rebase using a version of git earlier than 2.26, or by explicitly calling git -c rebase.backend=apply rebase, lazygit can display the pending todos by parsing the numbered patch files in .git/rebase-apply/. Unfortunately, support for this has been broken for more than three years because of the change in 682db77 (the string literal "normal" should have been changed to REBASE_MODE_NORMAL instead of REBASE_MODE_MERGING).

It's not an important bug since you can only get into this situation by doing a rebase outside of lazygit, and then only with a pretty old git version or by using very uncommon git options. So instead of fixing the bug, just remove the code.

This is an alternative to #3344.

Copy link

codacy-production bot commented Feb 28, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.07% (target: -2.00%) 88.89%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (e9b04b8) 48410 40574 83.81%
Head commit (eb0f7e3) 48361 (-49) 40566 (-8) 83.88% (+0.07%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#3348) 9 8 88.89%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

You may notice some variations in coverage metrics with the latest Coverage engine update. For more details, visit the documentation

@stefanhaller stefanhaller force-pushed the remove-support-for-old-style-non-interactive-rebase branch from 5a4a2d9 to fb1e823 Compare March 1, 2024 08:43
Copy link
Owner

@jesseduffield jesseduffield left a comment

Choose a reason for hiding this comment

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

I'm cool with this, nice work

@stefanhaller stefanhaller added the maintenance For refactorings, CI changes, tests, version bumping, etc label Mar 2, 2024
When doing a non-interactive rebase using a version of git earlier than 2.26, or
by explicitly calling `git -c rebase.backend=apply rebase`, lazygit can display
the pending todos by parsing the numbered patch files in `.git/rebase-apply/`.
Unfortunately, support for this has been broken for more than three years
because of the change in 682db77 (the string literal "normal" should have
been changed to REBASE_MODE_NORMAL instead of REBASE_MODE_MERGING).

It's not an important bug since you can only get into this situation by doing a
rebase outside of lazygit, and then only with a pretty old git version or by
using very uncommon git options. So instead of fixing the bug, just remove the
code.
@stefanhaller stefanhaller force-pushed the remove-support-for-old-style-non-interactive-rebase branch from fb1e823 to eb0f7e3 Compare March 2, 2024 09:26
@stefanhaller stefanhaller merged commit 0f14065 into master Mar 2, 2024
13 of 14 checks passed
@stefanhaller stefanhaller deleted the remove-support-for-old-style-non-interactive-rebase branch March 2, 2024 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance For refactorings, CI changes, tests, version bumping, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants