digging into historical commit references

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 28, 2020 at 04:35:17PM -0400, Jeff King wrote:

> You could probably get interesting numbers in our project by grepping
> for [0-9a-f]{7,} in commit messages to see which commits are referenced
> a lot. Those aren't always bug-fixes exactly, but they are often "we did
> this in commit XYZ, but that missed this case". Or maybe it would just
> tell you which commits are interesting enough that we keep coming back
> to them. ;)

Just for fun, I tried this. You can get a list of plausible references
with:

  git log --format=%B |
  perl -lne 'print $& for /[0-9a-f]{7,}/' |
  git cat-file --batch-check='%(objectname)' |
  grep -v missing

The top hits (by count) in git.git are:

  16 d1c5f2a42d (Add git-am, applymbox replacement., 2005-10-07)

     Referenced a lot during the C conversion, but not particularly
     buggy.

  14 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391

     Not a commit. Experienced Gits might recognize this particular
     sha1.

  13 d95138e695 (setup: set env $GIT_WORK_TREE when work tree is set, like $GIT_DIR, 2015-06-26)

     This one _is_ interesting, as it caused a lot of fallout and was
     reverted. But really only 4 commits; it just got mentioned several
     times in each (and my line-by-line count doesn't notice that).

  12 b1ef400eec (setup_git_env: avoid blind fall-back to ".git", 2016-10-20)

     This one also caused a lot of fallout (and actually had 7
     commits mention it), which doesn't surprise me, given the topic.

  10 94da9193a6 (grep: add support for PCRE v2, 2017-06-01)

     I wouldn't have thought this could have caused a lot of bugs, but
     apparently it did. :)

So I dunno. A little fun to look through, but I didn't find it
especially enlightening.

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux