jesseduffield / jesseduffield/lazygit

Allow rebase custom patch options for subcommits-started patch if from current branch

Open
#5,803 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

Description

### Is your feature request related to a problem? Please describe.
I was really confused as to why sometimes after creating a custom patch, the custom patch options menu would be missing some options like "Remove patch from original commit" or "Move patch out into index" even though they should be possible.

After playing around some more and looking at the code, it turns out this was due to my inconsistent muscle memory sometimes starting the custom patch from the branches -> subcommits view of the currently checked-out branch vs directly from the commits panel.

### Describe the solution you'd like
I don't think this discrepancy should exist. The two views are essentially semantically identical when drilling down on the current branch and all the rebase-related operations work in one versus the other.

### Describe alternatives you've considered
N/A

### Additional context
This was originally opened as a PR: https://github.com/jesseduffield/lazygit/pull/5801. Only after creating it did I see lazygit's contribution policy changed recently. Feel free to close/use that PR.

Contributor guide

Open the contributing guide

Research direction

Compare custom patch option handling when started from the current branch's branches -> subcommits view with the commits panel, using the behavior described in the issue and the referenced PR as the starting point. The work is done when both semantically equivalent entry points expose the same applicable rebase options, including removing a patch from its original commit and moving it into the index.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.