Hi Tomas,

Tomas Volf <~@wolfsden.cz> writes:

> One additional benefit is that you can search the git history using
> –grep instead of -G.  On repository of Guix’ size the difference is
> quite noticeable.

Interesting! In [my reply to Florian] I suggested passing [pathspecs] to
git-log, which should improve performance for -G. See also [git log -L],
which works with our .gitattributes and gitconfig setup to let you log
by function name without relying on commit messages:

┌────
│ $ time git log -n5 --grep 'size->number' >/dev/null
│ 
│ real    0m1.842s
│ user    0m1.665s
│ sys     0m0.166s
│ $ time git log -n5 '-L:size->number:guix/ui.scm' >/dev/null
│ 
│ real    0m2.099s
│ user    0m1.884s
│ sys     0m0.197s
└────

You may find ‘-L’ exposes cases where the handwritten listings forget to
mention a symbol!

I also consider blame tooling where you can quickly move past irrelevant
commits indispensable for this sort of work. Magit is pretty good in
this respect.

Thanks for mentioning this use case! I’d be interested to hear if anyone
has other tips on commit archaeology as well.

—Liam

PS: I bet you have fun getting form inputs to accept your email address 😄


[my reply to Florian] <https://yhetil.org/guix-devel/87v7o2atre....@hpfr.net/>

[pathspecs] 
<https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-pathspec>

[git log -L] 
<https://git-scm.com/docs/git-log#Documentation/git-log.txt--Lstartendfile>

Reply via email to