Repository navigation
Conversation
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
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.
Fixes #182. Previously, clicking "Show" on a branch always loaded 15,000 commits, ignoring the saved limit.
Now
show_branchreads 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_branchsends. With the limit set to 1,000, it sends-n 1000and 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.jsand 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.