completion: Use same config as list-topics for topic completion - #288
Open
jerry-skydio wants to merge 1 commit into
Open
completion: Use same config as list-topics for topic completion#288jerry-skydio wants to merge 1 commit into
jerry-skydio wants to merge 1 commit into
Conversation
Tab completion built git with hardcoded values (origin/main, empty base branch globs) instead of the repo config, so it picked the wrong base branch and surfaced thousands of stale historical topics. Two fixes: - Apply config to the parsers before argcomplete runs, so completers see the same resolved settings normal commands do. - topic_completer now builds git and topics via make_git/get_topics exactly as list-topics does, from the parsed namespace. Consolidate get_git into make_git (now takes the namespace directly), which also breaks the completion -> revup cyclic import.
Collaborator
Author
|
Reviews in this chain: |
Collaborator
Author
aaron-skydio
approved these changes
Aug 7, 2026
Comment on lines
+52
to
+53
| base_branch = getattr(parsed_args, "base_branch", None) or "" | ||
| relative_branch = getattr(parsed_args, "relative_branch", None) or "" |
Contributor
There was a problem hiding this comment.
these should be set regardless, but None if not passed? i.e. this can be
Suggested change
| base_branch = getattr(parsed_args, "base_branch", None) or "" | |
| relative_branch = getattr(parsed_args, "relative_branch", None) or "" | |
| base_branch = parsed_args.base_branch or "" | |
| relative_branch = parsed_args.relative_branch or "" |
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.
Tab completion built git with hardcoded values (origin/main, empty base
branch globs) instead of the repo config, so it picked the wrong base
branch and surfaced thousands of stale historical topics. Two fixes:
the same resolved settings normal commands do.
exactly as list-topics does, from the parsed namespace.
Consolidate get_git into make_git (now takes the namespace directly),
which also breaks the completion -> revup cyclic import.