git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* What the meaning of two commit ID in a merge commit's log
@ 2020-01-04  1:18 wuzhouhui
  2020-01-04  4:08 ` brian m. carlson
  0 siblings, 1 reply; 2+ messages in thread
From: wuzhouhui @ 2020-01-04  1:18 UTC (permalink / raw)
  To: git

Hi,

When I use "git log" to display commit log, I see there are
two commit IDs in a merge commit, e.g.

    commit 2187f215ebaac73ddbd814696d7c7fa34f0c3de0
    Merge: 2d3145f8d280 fbd542971aa1
    Author: Linus Torvalds <torvalds@linux-foundation.org>
    Date:   Tue Dec 17 13:27:02 2019 -0800

        Merge tag 'for-5.5-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux

In the previous example, we can see two commit IDs: 2d3145f8d280 and
fbd542971aa1. So, what's the meaning of them, precisely.

Thanks

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

* Re: What the meaning of two commit ID in a merge commit's log
  2020-01-04  1:18 What the meaning of two commit ID in a merge commit's log wuzhouhui
@ 2020-01-04  4:08 ` brian m. carlson
  0 siblings, 0 replies; 2+ messages in thread
From: brian m. carlson @ 2020-01-04  4:08 UTC (permalink / raw)
  To: wuzhouhui; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 1006 bytes --]

On 2020-01-04 at 01:18:58, wuzhouhui wrote:
> Hi,
> 
> When I use "git log" to display commit log, I see there are
> two commit IDs in a merge commit, e.g.
> 
>     commit 2187f215ebaac73ddbd814696d7c7fa34f0c3de0
>     Merge: 2d3145f8d280 fbd542971aa1
>     Author: Linus Torvalds <torvalds@linux-foundation.org>
>     Date:   Tue Dec 17 13:27:02 2019 -0800
> 
>         Merge tag 'for-5.5-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux
> 
> In the previous example, we can see two commit IDs: 2d3145f8d280 and
> fbd542971aa1. So, what's the meaning of them, precisely.

Non-merge commits have a single parent commit that they're based on
(unless they're a root commit).  Merge commits, since they merge two (or
more) separate lines of development, contain multiple parent commits
(usually, but not always, two).  So the two commit IDs here are the two
parent commits of this merge.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 868 bytes --]

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

end of thread, other threads:[~2020-01-04  4:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-04  1:18 What the meaning of two commit ID in a merge commit's log wuzhouhui
2020-01-04  4:08 ` brian m. carlson

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 NNTP newsgroup(s).