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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 13, 2012, 04:51 UTC
Message-ID
<7vwqxqf6li.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20121113034605.GB8387@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 6 quoted lines
> 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).

I was hoping that 2e6bdd3 (test-generation: compute generation numbers and clock skews, 2012-09-04) may be a good first step to come up with a practical and cheap solution on top of it.

The traversal can be fooled by clock skews when it sees a commit that has a timestamp that is older than it should, causing it to give up, incorrectly thinking that there won't be newer commits that it is interested in behind the problematic commit.

The logic implemented by the change is to identify these problematic commits, and we could record these commits with the value of the timestamps they should have had (e.g. the timestamp of the newest ancestor for each of these commits) in a notes tree. Then the traversal logic (commit-list-insert-by-date) could be updated use that "corrected" timestamp instead not to be fooled by the clock skew.

Such a notes tree can be built once and updated by only "appending", as a commit will never acquire more ancestors in its parents chain once it is made.

Is it too simplistic, or too costly? In git.git we have three such commits whose timestamp need to be corrected, while in the Linux kernel there were 2.2k skewed commits when I counted them a few months ago.

-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
Previous: Johannes SchindelinNext: Jeff King
Message 14 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.