From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: wuzhouhui <wuzhouhui14@mails.ucas.ac.cn>
Cc: git@vger.kernel.org
Subject: Re: What the meaning of two commit ID in a merge commit's log
Date: Sat, 4 Jan 2020 04:08:04 +0000 [thread overview]
Message-ID: <20200104040804.GD6570@camp.crustytoothpaste.net> (raw)
In-Reply-To: <56365810.1196c.16f6e224802.Coremail.wuzhouhui14@mails.ucas.ac.cn>
[-- 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 --]
prev parent reply other threads:[~2020-01-04 4:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200104040804.GD6570@camp.crustytoothpaste.net \
--to=sandals@crustytoothpaste.net \
--cc=git@vger.kernel.org \
--cc=wuzhouhui14@mails.ucas.ac.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).