git/list[1] front-page[2] threads[3] people[4] search[5] about
 

digging into historical commit references

From
Jeff King <peff@peff.net>
Date
May 29, 2020, 03:18 UTC
Message-ID
<20200529031858.GA1271617@coredump.intra.peff.net>
In-Reply-To
<20200528203516.GA1245262@coredump.intra.peff.net>
On Thu, May 28, 2020 at 04:35:17PM -0400, Jeff King wrote:
Show 6 quoted lines
> 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
Previous: Jeff KingNext: Torsten Bögershausen
Message 8 of 10 in “t: avoid alternation (not POSIX) in grep's BRE”
  1. t: avoid alternation (not POSIX) in grep's BRECarlo Marcelo Arenas Belón, May 28, 2020
  2. Junio C HamanoMay 28, 2020
  3. Jeff KingMay 28, 2020
  4. Junio C HamanoMay 28, 2020
  5. Jeff KingMay 28, 2020
  6. Junio C HamanoMay 28, 2020
  7. Jeff KingMay 28, 2020
  8. digging into historical commit referencesJeff King, May 29, 2020
  9. Torsten BögershausenMay 29, 2020
  10. t: avoid alternation (not POSIX) in grep's BRECarlo Marcelo Arenas Belón, May 29, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.