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

Re: How to determine the order of commit

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 5, 2019, 13:59 UTC
Message-ID
<xmqqva0xtoar.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<CAP8UFD21SaWUSqpKjTYVQkbQxLpFEhvjJW8019i6tAS9agnWGg@mail.gmail.com>
Christian Couder <christian.couder@gmail.com> writes:
Show 21 quoted lines
> Hi,
>
> On Tue, Mar 5, 2019 at 10:00 AM wuzhouhui <wuzhouhui14@mails.ucas.ac.cn> wrote:
>>
>> Suppose I have "git format-patch" two commit from a repository like
>> following:
>>
>>   git format-patch -1 cf1c9ccba730
>>   git format-patch -1 d1a2930d8a99
>>
>> Now, how to determine the commit order of these two patch in repository?
>
> Do you mean something like:
>
> $ git merge-base --is-ancestor cf1c9ccba730 d1a2930d8a99
>
> and:
>
> $ git merge-base --is-ancestor d1a2930d8a99 cf1c9ccba730
>
> ?
What if neither is true ;-)?
Previous: wuzhouhui
Message 4 of 4 in “How to determine the order of commit”
  1. wuzhouhuiMar 5, 2019
  2. Christian CouderMar 5, 2019
  3. wuzhouhuiMar 5, 2019
  4. Junio C HamanoMar 5, 2019

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.