fix: include_remote: false had no effect on revwalk scope#9
Conversation
When --local is used, configure_revwalk was still calling
push_glob("*") which walks all refs including remotes. This meant
-n counted commits from the full graph rather than the local-only
subgraph.
Fix by passing include_remote from Settings into configure_revwalk
and using push_glob("refs/heads/*") when remote refs should be
excluded.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@peso this fix is so that when using git-graph --local -n 10it won't show me 10 commits from the |
|
my workaround for now using is to pass |
|
Looks good, but you need to run |
|
I'll do it now though one sec |
|
alright @peso I ran |
|
@peso I applied linter fixes to all the other files in the repo to pass CI. ready to merge whenever |
|
Sorry that you had to fix formatting outside your PR. I forgot the state the code is still in. |
|
huge fan, love |
When no refspecs were provided,
configure_revwalkalways calledpush_glob("*"), walking all refs regardless ofSettings::include_remote. This meantBuilder::with_max_countwould count commits from the full graph even when the caller requested local-only traversal.Fix: pass
include_remoteintoconfigure_revwalkand usepush_glob("refs/heads/*")when false.