Add Git Log Overview mode#5799
Open
damiensawyer wants to merge 3 commits into
Open
Conversation
…f tips In repos with many merged PR branches the commits panel is dominated by run-of-the-mill commits, making it hard to see the shape of the history. Overview mode (bound to `~`, also in the log menu) hides every commit that is neither a merge commit nor pointed to by a local or remote branch, a tag, or HEAD, leaving just the landmarks. Rebase todo entries stay visible so mid-rebase views keep working. The graph keeps exactly the shape it has in the full log: the model keeps the full commit list next to the displayed subset, the graph's pipe sets are computed from the full list, and only the displayed rows are emitted. Lane positions and merge join lines therefore don't change when rows are hidden. When the mode is enabled while the selected commit is one that gets hidden, the selection moves to the nearest commit above it that stays visible and is scrolled into view, and disabling the mode jumps back to the original commit, unless the selection was moved in the meantime. Enabling the mode also turns off the commit limit: the condensed list can have far fewer rows than the load-more heuristic's threshold (selection approaching the end of the list), so the heuristic might never kick in. While active, the mode is shown in the information section with a reset button, and the commits view's title and tab label get an "(overview)" suffix, so hidden rows can't be mistaken for missing history and the mode can be cancelled from anywhere. Commands that feed the selection's list position into the rebase machinery (squash, fixup, edit, move up/down, reword, drop, amend, and friends) prompt to exit the mode first, exactly like filter mode does: with rows hidden, "the commit below" on screen is not the commit below in the real history.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi Jesse. I note and respect your comment that "This project does not accept pull requests".
I submit this anyway in the hope that might get through your gate. I personally think it's a useful feature.
PR Description
When a branch's history is full of individual, non-squashed commits, the commits panel gets stretched out vertically to the point that it's hard to see the bigger picture — when a branch was merged in, what merged where, and how the history is structured. This adds an overview mode (toggled with ~, also available from the log options menu) that condenses the list down to just the commits that carry that structural information, hiding everything else:
The result is a vertically condensed view where you can see at a glance when and where branches were merged into the one you're looking at, without scrolling past dozens of intermediate commits to piece it together.
The git graph keeps exactly the same shape it has in the full log — lane positions and merge join lines don't shift when rows are hidden, since the graph is computed from the full commit list and only the relevant rows are rendered.
Selection handling: if the selected commit gets hidden when the mode is turned on, the selection jumps to the nearest visible commit above it and scrolls into view. Turning the mode back off returns to the original commit, as long as the selection wasn't moved while in overview mode.
Commit limit: overview mode disables the commit-limit/load-more heuristic, since the condensed list can be much shorter than the threshold that heuristic relies on.
UI feedback: while active, the mode shows in the information panel with a reset button, and the commits view's title/tab gets an (overview) suffix, so hidden commits are never mistaken for missing history.
Guarded commands: actions that depend on the selection's position in the real commit list (squash, fixup, edit, move up/down, reword, drop, amend, etc.) prompt to exit overview mode first — the same pattern used by filter mode — since "the commit below" on screen isn't the commit below in the real history while rows are hidden.
Please check if the PR fulfills these requirements