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

blame --reverse selecting wrong commit

From
Shawn Pearce <spearce@spearce.org>
Date
May 30, 2011, 02:21 UTC
Message-ID
<BANLkTikuFEg686VH_RojEe-zmBZRBOx6eA@mail.gmail.com>

Although blame shows Stefan Lay removed the block in commit 05fa1713, this isn't what happened. It was actually removed in commit 2302a6d3 by Christian Halstrick. It looks like blame gets confused around this section of the JGit history.

Repository URL:  git://egit.eclipse.jgit/jgit.git
$ git blame -L 1080, --reverse 40fa75feb..master --
org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/RefDirectoryTest.java
283a60d1 (Shawn O. Pearce 2011-05-26 17:25:59 -0700 1080)       }
05fa1713 (Stefan Lay      2011-05-24 01:38:59 -0700 1081)
05fa1713 (Stefan Lay      2011-05-24 01:38:59 -0700 1082)       /**
05fa1713 (Stefan Lay      2011-05-24 01:38:59 -0700 1083)        *
Kick the timestamp of a local file.
05fa1713 (Stefan Lay      2011-05-24 01:38:59 -0700 1084)        * <p>
05fa1713 (Stefan Lay      2011-05-24 01:38:59 -0700 1085)        * We
shouldn't have to make these method calls. The cache is using file
05fa1713 (Stefan Lay      2011-05-24 01:38:59 -0700 1086)        *
system timestamps, and on many systems unit tests run faster than the
05fa1713 (Stefan Lay      2011-05-24 01:38:59 -0700 1087)        *
modification clock. Dumping the cache after we make an edit behind
05fa1713 (Stefan Lay      2011-05-24 01:38:59 -0700 1088)        *
RefDirectory's back allows the tests to pass.
05fa1713 (Stefan Lay      2011-05-24 01:38:59 -0700 1089)        *
05fa1713 (Stefan Lay      2011-05-24 01:38:59 -0700 1090)        * @param name
05fa1713 (Stefan Lay      2011-05-24 01:38:59 -0700 1091)        *
       the file in the repository to force a time change on.
05fa1713 (Stefan Lay      2011-05-24 01:38:59 -0700 1092)        */
05fa1713 (Stefan Lay      2011-05-24 01:38:59 -0700 1093)
private void BUG_WorkAroundRacyGitIssues(String name) {
-- 
Shawn.
Next: Shawn Pearce
Message 1 of 6 in “blame --reverse selecting wrong commit”
  1. Shawn PearceMay 30, 2011
  2. Shawn PearceMay 30, 2011
  3. Shawn PearceMay 30, 2011
  4. Junio C HamanoMay 30, 2011
  5. Shawn PearceMay 30, 2011
  6. Junio C HamanoMay 30, 2011

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.