feat: per-commit branch label and --project filter#8
Merged
Conversation
Resolve the branch each commit was reached from (git log --all --source,
%S) and surface it everywhere a commit is listed:
- model.Item gains a Branch field
- collect: capture %S, strip refs/{heads,remotes/<remote>,tags}/ prefixes
- render: commit markdown leads with the branch (linked to the commit)
and keeps the repo as context, dropping the bare @hash; JSON gains a
branch field
- tui picker: new branch column, branch added to the filter haystack
Add a --project <name> flag that narrows the resolved repos to a single
one by directory name (case-insensitive), erroring clearly if none match.
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.
What
Two related additions to make worklogs branch-aware and scopeable to a single project.
Per-commit branch label
model.Itemgains aBranchfield.collect:git lognow uses--all --sourceand captures%S, the ref each commit was reached from;shortRef()stripsrefs/heads/,refs/remotes/<remote>/, andrefs/tags/prefixes to a clean branch name.render: the commit markdown line now leads with the branch (linked to the commit) and keeps the repo as context, dropping the bare@hash. JSON output gains abranchfield.tuipicker: new branch column, and branch is included in the/filter haystack.Markdown example:
--projectfilter--project <name>flag narrows the resolved repos to a single one by directory name (case-insensitive), erroring clearly if no configured repo matches.Notes
development) rather than the original feature branch. Follow-up could prefer feature branches when a commit exists on both.Test plan
go build ./...,go vet ./...,go test ./...all pass.--projectfilters correctly, unknown project name errors cleanly.