git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-describe --contains fails on given tree
@ 2010-08-21 19:47 Jan Engelhardt
  2010-08-21 19:55 ` Jakub Narebski
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Engelhardt @ 2010-08-21 19:47 UTC (permalink / raw)
  To: git

Hi,



for some reason, git-describe cannot figure out v1.17~15^2^2 in
the pam_mount tree, despite me being able to actually give
a description that would fit the contains syntax:

$ git clone
git://pam-mount.git.sf.net/gitroot/pam-mount/pam-mount
Initialized empty Git repository in /dev/shm/pam-mount/.git/
remote: Counting objects: 7261, done.
remote: Compressing objects: 100% (1819/1819), done.
remote: Total 7261 (delta 5557), reused 6990 (delta 5348)
Receiving objects: 100% (7261/7261), 1.40 MiB | 832 KiB/s, done.
Resolving deltas: 100% (5557/5557), done.

$ cd pam-mount/
$ git describe --contains v1.17~15^2^2
fatal: cannot describe '95ce932690dfce8cbe50b6a3a8949e41a54c8966'

(Expected to get back: v1.17~15^2^2)

Why would it not want to return something? Possible bug?

Using git 1.7.1 on openSUSE 11.3.


thanks,
Jan

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

* Re: git-describe --contains fails on given tree
  2010-08-21 19:47 git-describe --contains fails on given tree Jan Engelhardt
@ 2010-08-21 19:55 ` Jakub Narebski
  2010-08-21 20:42   ` Jan Engelhardt
  0 siblings, 1 reply; 5+ messages in thread
From: Jakub Narebski @ 2010-08-21 19:55 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: git

Jan Engelhardt <jengelh@medozas.de> writes:

> Hi,
> 
> 
> 
> for some reason, git-describe cannot figure out v1.17~15^2^2 in
> the pam_mount tree, despite me being able to actually give
> a description that would fit the contains syntax:
> 
> $ git clone
> git://pam-mount.git.sf.net/gitroot/pam-mount/pam-mount
> Initialized empty Git repository in /dev/shm/pam-mount/.git/
> remote: Counting objects: 7261, done.
> remote: Compressing objects: 100% (1819/1819), done.
> remote: Total 7261 (delta 5557), reused 6990 (delta 5348)
> Receiving objects: 100% (7261/7261), 1.40 MiB | 832 KiB/s, done.
> Resolving deltas: 100% (5557/5557), done.
> 
> $ cd pam-mount/
> $ git describe --contains v1.17~15^2^2
> fatal: cannot describe '95ce932690dfce8cbe50b6a3a8949e41a54c8966'
> 
> (Expected to get back: v1.17~15^2^2)
> 
> Why would it not want to return something? Possible bug?

Is v1.17 an *annotated* tag?  What does

  $ git describe --contains --tags v1.17~15^2^2

return?

-- 
Jakub Narebski
Poland
ShadeHawk on #git

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

* Re: git-describe --contains fails on given tree
  2010-08-21 19:55 ` Jakub Narebski
@ 2010-08-21 20:42   ` Jan Engelhardt
  2010-08-22 21:58     ` Thomas Rast
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Engelhardt @ 2010-08-21 20:42 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: git


On Saturday 2010-08-21 21:55, Jakub Narebski wrote:
>> for some reason, git-describe cannot figure out v1.17~15^2^2 in
>> the pam_mount tree, despite me being able to actually give
>> a description that would fit the contains syntax:
>> 
>> $ git clone
>> git://pam-mount.git.sf.net/gitroot/pam-mount/pam-mount
>> Initialized empty Git repository in /dev/shm/pam-mount/.git/
>> remote: Counting objects: 7261, done.
>> remote: Compressing objects: 100% (1819/1819), done.
>> remote: Total 7261 (delta 5557), reused 6990 (delta 5348)
>> Receiving objects: 100% (7261/7261), 1.40 MiB | 832 KiB/s, done.
>> Resolving deltas: 100% (5557/5557), done.
>> 
>> $ cd pam-mount/
>> $ git describe --contains v1.17~15^2^2
>> fatal: cannot describe '95ce932690dfce8cbe50b6a3a8949e41a54c8966'
>> 
>> (Expected to get back: v1.17~15^2^2)
>> 
>> Why would it not want to return something? Possible bug?
>
>Is v1.17 an *annotated* tag?

It certainly is (if it were not, there be no tag, just commit):

$ git show v1.17
tag v1.17
Tagger: Jan Engelhardt <jengelh@medozas.de>
Date:   Mon Jan 26 00:41:17 2009 +0100

pam_mount 1.17
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEABECAAYFAkl8+J8ACgkQ92gFgoRMQ2Dd7QCeJj/u543aBiK/Los8LgvdkR/1
6nwAnA/CB23vjxFpVWsKZIW99GHxDglX
=yLqV
-----END PGP SIGNATURE-----

>What does
>
>  $ git describe --contains --tags v1.17~15^2^2

"Cannot describe 95ce..."

Funny thing is, describing "v1.17~15^2" does work, as does "v1.17~15^1".

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

* Re: git-describe --contains fails on given tree
  2010-08-21 20:42   ` Jan Engelhardt
@ 2010-08-22 21:58     ` Thomas Rast
  2010-08-23 11:26       ` Jan Engelhardt
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Rast @ 2010-08-22 21:58 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Jakub Narebski, git

Jan Engelhardt wrote:
> 
> On Saturday 2010-08-21 21:55, Jakub Narebski wrote:
> >> for some reason, git-describe cannot figure out v1.17~15^2^2 in
> >> the pam_mount tree, despite me being able to actually give
> >> a description that would fit the contains syntax:
> >What does
> >
> >  $ git describe --contains --tags v1.17~15^2^2
> 
> "Cannot describe 95ce..."
> 
> Funny thing is, describing "v1.17~15^2" does work, as does "v1.17~15^1".

That's clock skew:

  $ git show -s --format="%cd" v1.17~15^2 
  Fri Jan 9 04:35:59 2009 +0100

  $ git show -s --format="%cd" v1.17~15^2^2
  Sat Jan 24 16:35:34 2009 +0100

Note how the parent commit is far newer than the child.  git-name-rev
(which is what really drives git describe --contains) concludes that
it can stop searching along this line of history.

Interestingly, --stdin disables this optimization:

  $ git rev-parse v1.17~15^2^2 | git name-rev --stdin
  95ce932690dfce8cbe50b6a3a8949e41a54c8966 (tags/v1.17~15^2^2)

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

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

* Re: git-describe --contains fails on given tree
  2010-08-22 21:58     ` Thomas Rast
@ 2010-08-23 11:26       ` Jan Engelhardt
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Engelhardt @ 2010-08-23 11:26 UTC (permalink / raw)
  To: Thomas Rast; +Cc: Jakub Narebski, git

On Sunday 2010-08-22 23:58, Thomas Rast wrote:
>> On Saturday 2010-08-21 21:55, Jakub Narebski wrote:
>> >> for some reason, git-describe cannot figure out v1.17~15^2^2 in
>> >> the pam_mount tree, despite me being able to actually give
>> >> a description that would fit the contains syntax:
>> >What does
>> >
>> >  $ git describe --contains --tags v1.17~15^2^2
>> 
>> "Cannot describe 95ce..."
>> 
>> Funny thing is, describing "v1.17~15^2" does work, as does "v1.17~15^1".
>
>That's clock skew:
>
>  $ git show -s --format="%cd" v1.17~15^2 
>  Fri Jan 9 04:35:59 2009 +0100
>
>  $ git show -s --format="%cd" v1.17~15^2^2
>  Sat Jan 24 16:35:34 2009 +0100

Thanks for pointing that out.
(Ah the joy of BSD-inside-VMware.)

>Interestingly, --stdin disables this optimization:
>
>  $ git rev-parse v1.17~15^2^2 | git name-rev --stdin
>  95ce932690dfce8cbe50b6a3a8949e41a54c8966 (tags/v1.17~15^2^2)

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

end of thread, other threads:[~2010-08-23 11:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-21 19:47 git-describe --contains fails on given tree Jan Engelhardt
2010-08-21 19:55 ` Jakub Narebski
2010-08-21 20:42   ` Jan Engelhardt
2010-08-22 21:58     ` Thomas Rast
2010-08-23 11:26       ` Jan Engelhardt

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).