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

Re: [msysGit] Re: [PATCH] git tag --contains : avoid stack overflow

From
Jeff King <peff@peff.net>
Date
Nov 13, 2012, 03:46 UTC
Message-ID
<20121113034605.GB8387@sigill.intra.peff.net>
In-Reply-To
<alpine.DEB.1.00.1211130114180.13573@bonsai2>
On Tue, Nov 13, 2012 at 01:16:01AM +0000, Johannes Schindelin wrote:
Show 12 quoted lines
> > We can do much better than O(number of commits), though, if we stop
> > traversing down a path when its timestamp shows that it is too old to
> > contain the commits we are searching for. The problem is that the
> > timestamps cannot always be trusted, because they are generated on
> > machines with wrong clocks, or by buggy software. This could be solved
> > by calculating and caching a "generation" number, but last time it was
> > discussed there was a lot of arguing and nothing got done.
> 
> Sadly, not only machines with skewed clocks, but in particular buggy
> 3rd-party SCMs make this more than just problematic. In a git-svn clone
> that was used as base for heavy Git development, I encountered quite a lot
> of Jan 1, 1970 commits.

Yeah. We tolerate a certain amount of skew (24 hours for --name-rev, and 5 broken commits in a row for --since). But the big ones are usually software bugs (the big kernel ones were from broken "guilt", I think) or broken imports (when I published a bunch of skew statistics last year, the interesting ones were all imports; I don't know if they were software bugs, or just garbage in, garbage out).

> It just cannot be helped, we must distrust timestamps completely.

Note that name-rev will produce wrong answers in the face of clock skew. And I think that you even wrote that code. :)

-Peff
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 10 of 15 in “Re: [PATCH] git tag --contains : avoid stack overflow”
  1. Philip OakleyNov 10, 2012
  2. Jean-Jacques LafayNov 10, 2012
  3. Pat ThoytsNov 10, 2012
  4. René ScharfeNov 11, 2012
  5. Jeff KingNov 11, 2012
  6. Johannes SchindelinNov 11, 2012
  7. Jean-Jacques LafayNov 12, 2012
  8. Jeff KingNov 12, 2012
  9. Johannes SchindelinNov 13, 2012
  10. Jeff KingNov 13, 2012
  11. Johannes SchindelinNov 13, 2012
  12. Jeff KingNov 13, 2012
  13. Johannes SchindelinNov 13, 2012
  14. Junio C HamanoNov 13, 2012
  15. Jeff KingNov 13, 2012

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.