Skip to content

Make the refs shown by the commits view's whole-graph toggle configurable - #6004

Open
jacob-bayer wants to merge 1 commit into
jesseduffield:masterfrom
jacob-bayer:commits-pane-all-refs-args
Open

Make the refs shown by the commits view's whole-graph toggle configurable#6004
jacob-bayer wants to merge 1 commit into
jesseduffield:masterfrom
jacob-bayer:commits-pane-all-refs-args

Conversation

@jacob-bayer

@jacob-bayer jacob-bayer commented Sep 8, 2026

Copy link
Copy Markdown

Implements #6005.

PR Description

Exposes configuration option for customizing refs shown in commit pane.

Example:

git:
  log:
    allRefsArgs: ["--all", "--exclude=refs/agents/*"]

Please check if the PR fulfills these requirements

  • Cheatsheets are up-to-date (run go generate ./...)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here) — n/a, no user-facing strings
  • If a new UserConfig entry was added, make sure it can be hot-reloaded (see here) — read via self.UserConfig() at command-build time
  • Docs have been updated if necessary — docs-master/Config.md and schema-master/config.json regenerated
  • You've read through your own file changes for silly mistakes etc

…able

The whole-graph toggle hardcoded `--all`, which means every ref in the
repo. That is more than most people want: agent harnesses write large
numbers of refs under refs/agents, and stashes are refs too, so both
flood the commits view and bury the commits the user actually cares
about. There was no way to narrow the set short of turning the toggle
off entirely.

Add `git.log.allRefsArgs`, the args spliced into `git log` in place of
`--all`. It defaults to `["--all"]`, so existing behaviour is unchanged,
and can be set to something narrower such as `["--branches",
"--remotes"]`, or to `--all` plus `--exclude` globs.

Args rather than a whole command, as `git.allBranchesLogCmds` takes:
that pane dumps raw output into the main view, whereas the commits view
parses `git log` output field by field, so the pretty format and the
other flags have to stay under lazygit's control.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@jacob-bayer
jacob-bayer force-pushed the commits-pane-all-refs-args branch from 95e57f7 to ed51948 Compare September 8, 2026 08:58
@jacob-bayer jacob-bayer changed the title Make the refs shown by the commits view's whole-graph toggle configur… Make the refs shown by the commits view's whole-graph toggle configurable Sep 8, 2026
@jacob-bayer
jacob-bayer marked this pull request as ready for review September 8, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant