-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Section headers for rebase todos and actual commits #4463
base: revert-range-selection-of-commits
Are you sure you want to change the base?
Section headers for rebase todos and actual commits #4463
Conversation
Marking as a draft because two integration tests are failing. |
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
I added a fix for the failing tests; we can discuss if the fix is good enough. Opening for review. |
Nice, could we also use these markers to indicatie where a branch branched of the default branch (main)? That's something I miss in Lazygit. |
You can tell by the colors of the hashes; main branch hashes are green, the ones in your branch are either yellow or red, depending on whether they are pushed. I do realize that 10% of the population is color blind in some way, but I feel that section headers would be a bit too strong in this case. |
3a84492
to
25fa371
Compare
9a5e245
to
8aaacef
Compare
25fa371
to
d1b8318
Compare
…isn't focused When rerendering a view at the end of a refresh, we call HandleFocus only if the view has the focus. This is so that we rerender the main view for the new selection. What was missing here is to update the view selection from the list selection if the view doesn't have the focus, so that the selection is painted properly. Normally this is not relevant because you don't see the selection if another side panel has the focus; however, you do see it as an inactive selection when e.g. a popup is shown, in which case it does matter. This will become more important when we introduce section headers for commits, because in that case the view selection needs to change when the working copy state changes from normal to rebasing or vice versa, even if the list selection stays the same. The changed test submodule/reset.go shows how this was wrong before: when entering the submodule again after resetting, there is a refresh which keeps the same branch selected as before (master); however, since the branches panel is not focused, the view didn't notice and kept thinking that the detached head is selected (which it isn't, you can tell by running the test in sandbox mode and focusing the branches panel at the end: you'll see that master is selected). So the change in this commit fixes that.
This is needed because we want to show different section headers for rebase todos and cherry-pick/revert todos.
Now that we have sections, it is no longer needed. Keep the "<-- CONFLICTS" marker though.
8aaacef
to
c711aa4
Compare
d1b8318
to
027f33c
Compare
During interactive rebase, or when stopping with conflicts in a cherry-pick or revert, show section headers for the todo items and the actual commits. This makes it much clearer where the current head commit is. Get rid of the "<-- YOU ARE HERE" marker that we would previously show; it is no longer needed. (We still show the "<-- CONFLICT" marker though.)
For example:
go generate ./...
)