git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git-describe --contains
@ 2017-08-11  6:50 Davide Cavallari
  2017-08-11  9:12 ` Nicolas Morey-Chaisemartin
  2017-08-11  9:39 ` Andreas Schwab
  0 siblings, 2 replies; 4+ messages in thread
From: Davide Cavallari @ 2017-08-11  6:50 UTC (permalink / raw)
  To: git; +Cc: davide cavallari

Please help me understand how this command works. There is one case in the
linux kernel repository that puzzles me. Let's consider patch "drm/i915/
execlists: Reset RING registers upon resume" [1]. This patch was committed 641
commits after version 4.8-rc2:

~$ git describe bafb2f7d4755bf1571bd5e9a03b97f3fc4fe69ae
v4.8-rc2-641-gbafb2f7d4755

So I would expect to find it in version 4.8-rc3 and later versions.

However, if I search for the tag that follows (and hence contains) that
commit, I do not find version 4.8-rc3, nor version 4.8, nor version 4.9, but
4.10-rc1:

~$ git describe --contains bafb2f7d4755bf1571bd5e9a03b97f3fc4fe69ae
v4.10-rc1~154^2~44^2~178

Why? Why not v4.8-rc3? This means that the patch has been included neither in
v4.8 nor in v4.9, but only in version 4.10-rc1, right? Why so much time was
needed, considering it was the 621st commit on top ov v4.8-rc2?

BTW, what are the numbers 154^2~44^2~178 that follow the tag name?

Thanks & Regards,
   Davide

[1] https://patchwork.freedesktop.org/patch/111587/

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

* Re: git-describe --contains
  2017-08-11  6:50 git-describe --contains Davide Cavallari
@ 2017-08-11  9:12 ` Nicolas Morey-Chaisemartin
  2017-08-11  9:39 ` Andreas Schwab
  1 sibling, 0 replies; 4+ messages in thread
From: Nicolas Morey-Chaisemartin @ 2017-08-11  9:12 UTC (permalink / raw)
  To: Davide Cavallari, git



Le 11/08/2017 à 08:50, Davide Cavallari a écrit :
> Please help me understand how this command works. There is one case in the
> linux kernel repository that puzzles me. Let's consider patch "drm/i915/
> execlists: Reset RING registers upon resume" [1]. This patch was committed 641
> commits after version 4.8-rc2:
>
> ~$ git describe bafb2f7d4755bf1571bd5e9a03b97f3fc4fe69ae
> v4.8-rc2-641-gbafb2f7d4755
>
> So I would expect to find it in version 4.8-rc3 and later versions.
>
> However, if I search for the tag that follows (and hence contains) that
> commit, I do not find version 4.8-rc3, nor version 4.8, nor version 4.9, but
> 4.10-rc1:
>
> ~$ git describe --contains bafb2f7d4755bf1571bd5e9a03b97f3fc4fe69ae
> v4.10-rc1~154^2~44^2~178
>
> Why? Why not v4.8-rc3? This means that the patch has been included neither in
> v4.8 nor in v4.9, but only in version 4.10-rc1, right? Why so much time was
> needed, considering it was the 621st commit on top ov v4.8-rc2?

Because it was not in v4.8-rc3.
This probably means it was applied on a branch that started from somewhere between 4.8-rc2 and 4.8-rc3 but it was only merge into master after v4.9 was released


>
> BTW, what are the numbers 154^2~44^2~178 that follow the tag name?

This is due to merges. You have basically a roadmap to go up the ancestry graph.
~154 means 154 commit before the tag
^2 means the 2nd parent of this commit.
and so on...

The format is detailed (among other tings) in man gitrevisions

Nicolas


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

* Re: git-describe --contains
  2017-08-11  6:50 git-describe --contains Davide Cavallari
  2017-08-11  9:12 ` Nicolas Morey-Chaisemartin
@ 2017-08-11  9:39 ` Andreas Schwab
       [not found]   ` <CANOKemc32rreg5TVYdxYQ=te1a-wv5PeOPwGfX3Sye0gPQPC=Q@mail.gmail.com>
  1 sibling, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2017-08-11  9:39 UTC (permalink / raw)
  To: Davide Cavallari; +Cc: git

On Aug 11 2017, Davide Cavallari <davide.cavallari@gmail.com> wrote:

> Please help me understand how this command works. There is one case in the
> linux kernel repository that puzzles me. Let's consider patch "drm/i915/
> execlists: Reset RING registers upon resume" [1]. This patch was committed 641
> commits after version 4.8-rc2:
>
> ~$ git describe bafb2f7d4755bf1571bd5e9a03b97f3fc4fe69ae
> v4.8-rc2-641-gbafb2f7d4755
>
> So I would expect to find it in version 4.8-rc3 and later versions.
>
> However, if I search for the tag that follows (and hence contains) that
> commit, I do not find version 4.8-rc3, nor version 4.8, nor version 4.9, but
> 4.10-rc1:
>
> ~$ git describe --contains bafb2f7d4755bf1571bd5e9a03b97f3fc4fe69ae
> v4.10-rc1~154^2~44^2~178
>
> Why? Why not v4.8-rc3? This means that the patch has been included neither in
> v4.8 nor in v4.9, but only in version 4.10-rc1, right? Why so much time was
> needed, considering it was the 621st commit on top ov v4.8-rc2?

You have to ask that the maintainers of the drm subsystem.  If you look
at commit 5481e27f6fd06b7cb902072e81d6b083db8155eb you see that the
branch containing the above commit was merged into a branch that follows
v4.9-rc2, which eventually was merged into v4.10-rc1.

> BTW, what are the numbers 154^2~44^2~178 that follow the tag name?

See git-rev-parse(1).  '~N' means to go back N parents, ^N means to pick
parent N of a merge commit.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: git-describe --contains
       [not found]   ` <CANOKemc32rreg5TVYdxYQ=te1a-wv5PeOPwGfX3Sye0gPQPC=Q@mail.gmail.com>
@ 2017-08-13  6:39     ` Davide Cavallari
  0 siblings, 0 replies; 4+ messages in thread
From: Davide Cavallari @ 2017-08-13  6:39 UTC (permalink / raw)
  To: git

Thanks Andreas and Nicholas, I'll check it out.

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

end of thread, other threads:[~2017-08-13  6:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-11  6:50 git-describe --contains Davide Cavallari
2017-08-11  9:12 ` Nicolas Morey-Chaisemartin
2017-08-11  9:39 ` Andreas Schwab
     [not found]   ` <CANOKemc32rreg5TVYdxYQ=te1a-wv5PeOPwGfX3Sye0gPQPC=Q@mail.gmail.com>
2017-08-13  6:39     ` Davide Cavallari

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).