git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* How to determine the order of commit
@ 2019-03-05  8:51 wuzhouhui
  2019-03-05 12:39 ` Christian Couder
  0 siblings, 1 reply; 4+ messages in thread
From: wuzhouhui @ 2019-03-05  8:51 UTC (permalink / raw)
  To: git

Hi,

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?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to determine the order of commit
  2019-03-05  8:51 How to determine the order of commit wuzhouhui
@ 2019-03-05 12:39 ` Christian Couder
  2019-03-05 13:17   ` wuzhouhui
  2019-03-05 13:59   ` Junio C Hamano
  0 siblings, 2 replies; 4+ messages in thread
From: Christian Couder @ 2019-03-05 12:39 UTC (permalink / raw)
  To: wuzhouhui; +Cc: git

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

?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to determine the order of commit
  2019-03-05 12:39 ` Christian Couder
@ 2019-03-05 13:17   ` wuzhouhui
  2019-03-05 13:59   ` Junio C Hamano
  1 sibling, 0 replies; 4+ messages in thread
From: wuzhouhui @ 2019-03-05 13:17 UTC (permalink / raw)
  To: Christian Couder; +Cc: git


> On Mar 5, 2019, at 8:39 PM, Christian Couder <christian.couder@gmail.com> wrote:
> 
> 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
> 
Yep, that's what I want. Thanks!
> ?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to determine the order of commit
  2019-03-05 12:39 ` Christian Couder
  2019-03-05 13:17   ` wuzhouhui
@ 2019-03-05 13:59   ` Junio C Hamano
  1 sibling, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2019-03-05 13:59 UTC (permalink / raw)
  To: Christian Couder; +Cc: wuzhouhui, git

Christian Couder <christian.couder@gmail.com> writes:

> 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 ;-)?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-03-05 13:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-05  8:51 How to determine the order of commit wuzhouhui
2019-03-05 12:39 ` Christian Couder
2019-03-05 13:17   ` wuzhouhui
2019-03-05 13:59   ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).