Re: What the meaning of two commit ID in a merge commit's log

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxx>
>     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: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux