git-who icon indicating copy to clipboard operation
git-who copied to clipboard

Option to exclude vendor?

Open alexellis opened this issue 9 months ago • 2 comments

Hi, I just tried out your tool after seeing it on the HN front page. Congrats 👍

When running on any Go codebase, the vendor folder needs to be excluded - it creates noise.

(For an example you could see openfaas/faas)

Does that make sense for your tool? --exclude /vendor/ for instance?

alexellis avatar Mar 19 '25 08:03 alexellis

Was coming here to make a very similar request to ignore package.json/package-lock.json files in node.js projects.

mdouglass avatar Mar 19 '25 16:03 mdouglass

A commenter on the HN post pointed out that Git allows you to specify a path like e.g. :!vendor/ and that will cause the folder to be ignored.

Because git who passes the path args on to git log, the following should actually work:

$ git who ':!vendor/'

That said, I wasn't aware of this functionality, and I think it won't work perfectly whenever git who is reading commits from its cache. I'll try to fix this for the next release.

sinclairtarget avatar Mar 20 '25 11:03 sinclairtarget

Hey this should be fully supported by git who as of v0.7. Let me know if you have any trouble

sinclairtarget avatar Mar 29 '25 00:03 sinclairtarget

In case this is helpful to others that come across this issue, if you want to exclude multiple paths:

git who -- ':!vendor/' ':!go.*'

lcarva avatar Aug 15 '25 13:08 lcarva