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

Re: [PATCH v2] Fix revision walk for commits with the same dates

From
Kacper Kornet <draenog@pld-linux.org>
Date
Mar 22, 2013, 21:07 UTC
Message-ID
<20130322210741.GC18210@camk.edu.pl>
In-Reply-To
<7va9pv6u4k.fsf@alter.siamese.dyndns.org>
On Fri, Mar 22, 2013 at 01:45:47PM -0700, Junio C Hamano wrote:
> Kacper Kornet <draenog@pld-linux.org> writes:
Show 7 quoted lines
> > Logic in still_interesting function allows to stop the commits
> > traversing if the oldest processed commit is not older then the
> > youngest commit on the list to process and the list contains only
> > commits marked as not interesting ones. It can be premature when dealing
> > with a set of coequal commits. For example git rev-list A^! --not B
> > provides wrong answer if all commits in the range A..B had the same
> > commit time and there are more then 7 of them.
> > To fix this problem the relevant part of the logic in still_interesting
> > is changed to: the walk can be stopped if the oldest processed commit is
> > younger then the youngest commit on the list to processed.
> Is the made-up test case to freeze the clock even interesting?  The
> slop logic is merely a heuristic to compensate for effects caused by
> skewed or non-monototic clocks, so in a different repository you may
> even need to fuzz the timestamp comparison further
> 	if (date - 10 < src->item->date)
> or something silly like that.

I don't think it is a made-up test case. For example it is easy to get a number of coequal commits by using git rebase -i. So I argue that git should treat correctly ranges of such commits.

-- 
  Kacper Kornet
Previous: Junio C HamanoNext: Eric Sunshine
Message 4 of 5 in “Fix revision walk for commits with the same dates”
  1. Fix revision walk for commits with the same datesKacper Kornet, Mar 7, 2013
  2. Fix revision walk for commits with the same datesKacper Kornet, Mar 22, 2013
  3. Junio C HamanoMar 22, 2013
  4. Kacper KornetMar 22, 2013
  5. Eric SunshineMar 24, 2013

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.