I was curious about whether NB or Note was more common in a codebase I was working on, and that was fairly simple to see:
git grep NB $DIREC | wc -l
However, then I wondered whether different people used NB or Note, so I tried
find $DIREC -type f | grep -v '/\.' | xargs -n1 git blame | grep NB
however, it took a while, and top suggested git blame was the culprit, which makes a lot of sense. How to minimize git blame? Well, we don't need to blame any lines except for the ones which contain NB, and we don't need to do any files except for the ones which contain NB.
So . . .
git grep --line-number NB $DIREC | \ cut -d ' ' -f 1 | \ rev | \ cut -c '2-' | \ rev | \ while read s; do \ arr=("${(s/:/)s}"); \ git blame -L $arr[2],$arr[2] $arr[1] | \ cat; \ done;
Anyway, it seemed like in this codebase, Note was used more frequently, but there wasn't any one person who used NB, and everyone who had used NB had also used Note before.
















