Skip to content

Fix branch Show to respect the saved commit limit (#182) - #198

Open
zaidwhy wants to merge 2 commits into
phil294:masterfrom
zaidwhy:show-branch-respect-saved-n
Open

zaidwhy wants to merge 2 commits into
phil294:masterfrom
zaidwhy:show-branch-respect-saved-n

Conversation

@zaidwhy

@zaidwhy zaidwhy commented Nov 9, 2026

Copy link
Copy Markdown

Fixes #182. Previously, clicking "Show" on a branch always loaded 15,000 commits, ignoring the saved limit.

Now show_branch reads the limit from the current log command. It supports -n 1000, -n1000, and --max-count=1000, and uses the last limit if multiple are provided, just like Git. If no limit is set, it defaults to 15,000.

Tested on a 20,000-commit repo by checking the command show_branch sends. With the limit set to 1,000, it sends -n 1000 and Git returns 1,000 commits. With the default command or no limit, it still sends -n 15000.

The change is limited to one function in web/src/data/store/index.js and uses the regex approach you suggested.

Type-check and lint already fail on master (see #190); this change introduces no new errors.

I saw you were planning to work on this yourself, so feel free to modify or replace my approach if you prefer.

The "Show" button next to a branch tip always loaded 15000 commits,
ignoring a smaller -n the user saved in the main log configuration.
Take -n from the current log command instead, falling back to 15000.

Closes phil294#182
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.

Feature Request: Use saved -n parameter when viewing specific branches

1 participant