From: Jeff King <peff@peff.net>
To: Philippe De Muyter <phdm@macq.eu>
Cc: git@vger.kernel.org
Subject: Re: identical hashes on two branches, but holes in git log
Date: Tue, 19 May 2015 19:39:25 -0400 [thread overview]
Message-ID: <20150519233925.GA22748@peff.net> (raw)
In-Reply-To: <20150519132958.GA21130@frolo.macqel>
On Tue, May 19, 2015 at 03:29:58PM +0200, Philippe De Muyter wrote:
> Trying to understand, I have eventually done "git log" on my branch and
> on v3.15 with the following commands :
>
> git log v3.15 --full-history --decorate=short | grep '^commit' > /tmp/3.15.commits
> git log --full-history --decorate=short | grep '^commit' > /tmp/mybranch.commits
>
> I compare then the two histories with
>
> diff -u /tmp/3.15.commits /tmp/mybranch.commits
>
> and I get (excerpt) :
>
> --- /tmp/3.15.commits 2015-05-19 13:19:59.665205514 +0200
> +++ /tmp/mybranch.commits 2015-05-19 13:19:52.452081328 +0200
> @@ -1,3780 +1,84 @@
> -commit 1860e379875dfe7271c649058aeddffe5afd9d0d (tag: v3.15)
> -commit ...
> ...
> -commit fad01e866afdbe01a1f3ec06a39c3a8b9e197014 (tag: v3.15-rc8)
> ...
> ...
> -commit c9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (tag: v3.15-rc1)
> ...
> -commit 57673c2b0baa900dddae3b9eb3d7748ebf550eb3
> +commit a1fb433346cb5733945b5fc243f7334744bae4fd (HEAD, macq_boards-3.14.0)
> +commit ...
> ...
> +commit 2be7b20bbb337e0031e0f0d39c9a4845b6bbf3b8
It looks like v3.15 is ahead of your branch. And I _think_ your question
is: since they both contain v3.14, shouldn't they also contain all of
the ancestors of v3.14?
The answer is yes. But from your output here:
> commit 455c6fdbd219161bd09b1165f11699d6d73de11c (tag: v3.14) ==== identical commit
> -commit c32fc9c803f8ed90a7548810de48ca33a3020168 ==== commit missing in my branch
> commit fedc1ed0f11be666de066b0c78443254736a942e ==== more identical commits
I think what you are saying is: c32fc9c803 comes after v3.14, so it
should be an ancestor, right?
And the answer is no. Git's traversal order does not necessarily reflect
the true topology if you have multiple lines of development. And in this
case, they do not have a direct ancestry relationship (i.e., they are on
separate branches, and neither is an ancestor of the other).
-Peff
next prev parent reply other threads:[~2015-05-19 23:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-19 13:29 identical hashes on two branches, but holes in git log Philippe De Muyter
2015-05-19 16:01 ` Junio C Hamano
2015-05-19 21:47 ` Philippe De Muyter
2015-05-19 22:12 ` Junio C Hamano
2015-05-21 7:15 ` Philippe De Muyter
2015-05-21 19:58 ` Philip Oakley
2015-05-21 20:37 ` Philippe De Muyter
2015-05-20 7:39 ` Christian Couder
2015-05-19 23:39 ` Jeff King [this message]
2015-05-20 13:13 ` Philippe De Muyter
2015-05-20 13:25 ` John Keeping
2015-05-20 14:12 ` Philippe De Muyter
2015-05-20 16:18 ` Jeff King
2015-05-21 7:05 ` Philippe De Muyter
2015-05-21 16:45 ` Junio C Hamano
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=20150519233925.GA22748@peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=phdm@macq.eu \
/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).