{"thread":{"id":"50655","subject":"How to determine the order of commit","startedAt":"2019-03-05T08:51:39Z","lastAt":"2019-03-05T13:59:30Z","messageCount":4,"participants":["wuzhouhui","Christian Couder","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"370675","messageId":"40f11dda.1d424.1694d0cd42b.Coremail.wuzhouhui14@mails.ucas.ac.cn","threadId":"50655","inReplyTo":null,"subject":"How to determine the order of commit","fromName":"wuzhouhui","fromEmail":"wuzhouhui14@mails.ucas.ac.cn","sentAt":"2019-03-05T08:51:20Z","receivedAt":"2019-03-05T08:51:39Z","isPatch":false,"sender":{"key":"wuzhouhui14@mails.ucas.ac.cn","avatar":null},"body":"Hi,\n\nSuppose I have \"git format-patch\" two commit from a repository like\nfollowing:\n\n  git format-patch -1 cf1c9ccba730\n  git format-patch -1 d1a2930d8a99\n\nNow, how to determine the commit order of these two patch in repository?"},{"id":"370703","messageId":"CAP8UFD21SaWUSqpKjTYVQkbQxLpFEhvjJW8019i6tAS9agnWGg@mail.gmail.com","threadId":"50655","inReplyTo":"40f11dda.1d424.1694d0cd42b.Coremail.wuzhouhui14@mails.ucas.ac.cn","subject":"Re: How to determine the order of commit","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2019-03-05T12:39:00Z","receivedAt":"2019-03-05T12:39:15Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Hi,\n\nOn Tue, Mar 5, 2019 at 10:00 AM wuzhouhui <wuzhouhui14@mails.ucas.ac.cn> wrote:\n>\n> Suppose I have \"git format-patch\" two commit from a repository like\n> following:\n>\n>   git format-patch -1 cf1c9ccba730\n>   git format-patch -1 d1a2930d8a99\n>\n> Now, how to determine the commit order of these two patch in repository?\n\nDo you mean something like:\n\n$ git merge-base --is-ancestor cf1c9ccba730 d1a2930d8a99\n\nand:\n\n$ git merge-base --is-ancestor d1a2930d8a99 cf1c9ccba730\n\n?\n"},{"id":"370709","messageId":"1AC99C35-03C0-4121-93B2-0D42F126106D@mails.ucas.ac.cn","threadId":"50655","inReplyTo":"CAP8UFD21SaWUSqpKjTYVQkbQxLpFEhvjJW8019i6tAS9agnWGg@mail.gmail.com","subject":"Re: How to determine the order of commit","fromName":"wuzhouhui","fromEmail":"wuzhouhui14@mails.ucas.ac.cn","sentAt":"2019-03-05T13:17:41Z","receivedAt":"2019-03-05T13:17:57Z","isPatch":false,"sender":{"key":"wuzhouhui14@mails.ucas.ac.cn","avatar":null},"body":"\n> On Mar 5, 2019, at 8:39 PM, Christian Couder <christian.couder@gmail.com> wrote:\n> \n> Hi,\n> \n> On Tue, Mar 5, 2019 at 10:00 AM wuzhouhui <wuzhouhui14@mails.ucas.ac.cn> wrote:\n>> \n>> Suppose I have \"git format-patch\" two commit from a repository like\n>> following:\n>> \n>>  git format-patch -1 cf1c9ccba730\n>>  git format-patch -1 d1a2930d8a99\n>> \n>> Now, how to determine the commit order of these two patch in repository?\n> \n> Do you mean something like:\n> \n> $ git merge-base --is-ancestor cf1c9ccba730 d1a2930d8a99\n> \n> and:\n> \n> $ git merge-base --is-ancestor d1a2930d8a99 cf1c9ccba730\n> \nYep, that's what I want. Thanks!\n> ?\n\n"},{"id":"370715","messageId":"xmqqva0xtoar.fsf@gitster-ct.c.googlers.com","threadId":"50655","inReplyTo":"CAP8UFD21SaWUSqpKjTYVQkbQxLpFEhvjJW8019i6tAS9agnWGg@mail.gmail.com","subject":"Re: How to determine the order of commit","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-03-05T13:59:24Z","receivedAt":"2019-03-05T13:59:30Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Christian Couder <christian.couder@gmail.com> writes:\n\n> Hi,\n>\n> On Tue, Mar 5, 2019 at 10:00 AM wuzhouhui <wuzhouhui14@mails.ucas.ac.cn> wrote:\n>>\n>> Suppose I have \"git format-patch\" two commit from a repository like\n>> following:\n>>\n>>   git format-patch -1 cf1c9ccba730\n>>   git format-patch -1 d1a2930d8a99\n>>\n>> Now, how to determine the commit order of these two patch in repository?\n>\n> Do you mean something like:\n>\n> $ git merge-base --is-ancestor cf1c9ccba730 d1a2930d8a99\n>\n> and:\n>\n> $ git merge-base --is-ancestor d1a2930d8a99 cf1c9ccba730\n>\n> ?\n\nWhat if neither is true ;-)?\n"}]}