Skip to content

feat: add --extra-git-log-flags CLI flag - #102

Open
aduh95 wants to merge 1 commit into
mainfrom
extra-git-log-flags
Open

aduh95 wants to merge 1 commit into
mainfrom
extra-git-log-flags

Conversation

@aduh95

@aduh95 aduh95 commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

It can be useful to filter E.g. only changes that touch deps/: branch-diff … --extra-git-log-flags=" -- deps/"

Comment thread branch-diff.js
const refcmd = 'git rev-list --max-count=1 {{ref}}'
const commitdatecmd = '$(git show -s --format=%cd `{{refcmd}}`)'
const gitcmd = 'git log {{startCommit}}..{{branch}} --until="{{untilcmd}}"'
const gitcmd = 'git log {{startCommit}}..{{branch}} --until="{{untilcmd}}"{{gitLogFlags}}'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one of the problems of having no tests in this repo is that you don't get to notice that this doesn't work cause there's no extra space in here

@rvagg

rvagg commented Nov 21, 2026

Copy link
Copy Markdown
Member

is this important? do you have an active use-case for it now that's causing problems? one issue here is that it's really easy to come up with a flag that changes git output and breaks all the assumptions of the data collection, pretty big footgun that's hard to report useful errors about; perhaps there's a less generalised solution to the problem you're trying to solve?

@aduh95

aduh95 commented Nov 21, 2026

Copy link
Copy Markdown
Contributor Author

My current process is to modify the source to add the -- deps/, which is fine but not very elegant. The use case is to reduce the scope of the search to avoid getting rate limited when dealing with older release lines

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.

2 participants