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

Re: Occasional wrong behavior of rev-walking (rev-list, log, etc.)

From
Junio C Hamano <gitster@pobox.com>
Date
May 21, 2015, 22:59 UTC
Message-ID
<CAPc5daVnrjdjoiq8-H7vs2WAre+Kt7J5re_kZ2YD9tF8dG8UUw@mail.gmail.com>
In-Reply-To
<20150521224956.GA23810@glandium.org>
Depends on why you are running rev-list.

If you want to know if one commit is contained in another, the way that should work the most reliably is to use merge-base, as the traversal engine of that command was written not to trust the commit timestamps but go with the topology alone.

(pardon top-posting and overlong lines; typed in GMail)
On Thu, May 21, 2015 at 3:49 PM, Mike Hommey <mh@glandium.org> wrote:
Show 20 quoted lines
> On Thu, May 21, 2015 at 09:41:55AM -0700, Junio C Hamano wrote:
>> Mike Hommey <mh@glandium.org> writes:
>>
>> > My guess is that rev-walking is tripping on the fact that this repository
>> > has commit dates in random order.
>>
>> Yeah, that is well known (look for SLOP both in the code and list
>> archive).
>
> I found the recent thread about git describe --contains. (and now I
> realize this is also why git describe --contains doesn't work quite well
> for the same repository).
>
> Now the question is what can we done in the short term? (short of
> introducing something like generation numbers) I tried increasing
> SLOP and to remove the date check (with the hope that making one or
> both configurable might help). Neither fixed the particular test
> case I started this thread with.
>
> Mike
Previous: Mike HommeyNext: Mike Hommey
Message 4 of 5 in “Occasional wrong behavior of rev-walking (rev-list, log, etc.)”
  1. Mike HommeyMay 21, 2015
  2. Junio C HamanoMay 21, 2015
  3. Mike HommeyMay 21, 2015
  4. Junio C HamanoMay 21, 2015
  5. Mike HommeyMay 22, 2015

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.