Make the refs shown by the commits view's whole-graph toggle configurable
Author: jacob-bayerCreated Sep 8, 2026Updated Sep 8, 2026
Is your feature request related to a problem? Please describe.
The commit view's whole-graph toggle hardcodes --all when building the git log command, which means every ref in the repo.
Agent harnesses like Claude and Copilot write large numbers of checkpoint commits under refs/agents, and stashes are refs too. I’d like to filter stashes and agent checkpoints out of this view.
Describe the solution you'd like
A config option that controls which args are spliced into git log in place of --all, e.g.:
git:
log:
allRefsArgs: ["--branches", "--remotes"]
It would default to ["--all"], so existing behaviour is unchanged, and could be set to something narrower like the above, or to --all plus --exclude globs:
git:
log:
allRefsArgs: ["--all", "--exclude=refs/agents/*"]
Describe alternatives you've considered
- Turning the whole-graph toggle off. Loses the other branches, which is the whole point of the toggle.
- A boolean like
excludeStashes. Narrower, and doesn't help with the general problem of third-party tooling writing refs; a list of args covers stashes, agent refs, and whatever comes next without another config option each time. - A full command override like
git.allBranchesLogCmds. Doesn't work here, since lazygit has to parse the output — see above. - A custom command. Can't help: the commits view builds this
git loginvocation itself.
Additional context
I have a prototype implementing this: https://github.com/jesseduffield/lazygit/pull/6004
Source: jesseduffield/lazygit