5 ms·
> and don't even think to question if you can do something like "git log -G'int.*foo\(' -- ':(exclude)directory'" I do question it, but I know the answer is ha
by jve 3y ago
> and don't even think to question if you can do something like "git log -G'int.*foo\(' -- ':(exclude)directory'"
I do question it, but I know the answer is hard (as you demonstrated), so I don't bother. And I'm now looking at git log docs - I fail to parse how the exclude works even looking at the docs - I don't find anything about `:(` contstruct which houses exclude keyword. But thanks for -G - that will be useful.
> Code in the git log is invisible to a lot of tooling
This is the issue. I expect when searching code to have a way to search older commits. But azure devops won't do it. There is no checkbox "Include all commits"
- deleted 3y ago[deleted]
- TheDong 3y ago> I fail to parse how the exclude works even looking at the docs Most git subcommands can take a pathspec, including git log. The documentation you want to read is the pathspec docs, see here: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefpathspecapathspec https://git-scm.com/docs/gitglossary#Documentation/gitglossa... You can see that it includes the exclude keyword, among others. Since it applies to almost every command (from 'git add -- <pathspec>' to 'git checkout -- <pathspec>'), it's not mentioned as clearly in individual commands.
- planede 3y agogit log and all other commands' man page should really refer back to gitglossary here then. And they should either name their argument <pathspec>, or specify that the given argument (<path> or <file>) is a pathspec.