[yocto] 1.5_M5.rc6 available for testing.

Stanacar, StefanX stefanx.stanacar at intel.com
Thu Oct 3 03:22:22 PDT 2013



On Thu, 2013-10-03 at 09:36 +0000, Stanacar, StefanX wrote:
> 
> On Thu, 2013-10-03 at 09:16 +0000, Stanacar, StefanX wrote:
> > 
> 
> 
> > Also:
> > [stefans at firebird poky2]$ git tag -l --contains
> > 0197e5cb4253d6137b0d166cfcd699d404d2cab3
> > 1.5_M5.rc6
> > [stefans at firebird poky2]$ git tag -l --contains
> > a02280f99f05b1c21de2a78de9222a2f62a0dabc
> > 1.5_M5.rc6
> > [stefans at firebird poky2]$ git tag -v 1.5_M5.rc6
> > object a02280f99f05b1c21de2a78de9222a2f62a0dabc
> > type commit
> > tag 1.5_M5.rc6
> > 
> > I don't know how git rev-parse is supposed to work on a tag and why it
> > returns a different id, but it's a bit confusing.
> > 
> 
> Okay this tagging thing confuses me, although everything seems to be in
> orderd the ids are identical.
> If someone with more git-fu can explain what and how this happens I'd be
> grateful:
> 
> [stefans at firebird poky]$ git rev-list 1.5_M5.rc6 | head -n1
> a02280f99f05b1c21de2a78de9222a2f62a0dabc
> [stefans at firebird poky]$ git show-ref 1.5_M5.rc6
> 0197e5cb4253d6137b0d166cfcd699d404d2cab3 refs/tags/1.5_M5.rc6
> [stefans at firebird poky]$ git rev-parse 1.5_M5.rc6
> 0197e5cb4253d6137b0d166cfcd699d404d2cab3
> [stefans at firebird poky]$ git rev-parse --verify 1.5_M5.rc6^{commit}
> a02280f99f05b1c21de2a78de9222a2f62a0dabc
> [stefans at firebird poky]$ git show-ref --dereference 1.5_M5.rc6
> 0197e5cb4253d6137b0d166cfcd699d404d2cab3 refs/tags/1.5_M5.rc6
> a02280f99f05b1c21de2a78de9222a2f62a0dabc refs/tags/1.5_M5.rc6^{}
> [stefans at firebird poky]$ 
> 

Okay, it's pretty clear. It all comes down to annotated vs lightweight
tags.
1.5_M5.rc6 it's an annotated tag (which contains metadata and the SHA-1
hash of the object it tags) and git gives a SHA-1 hash to all objects
not only commits (tags,trees,blobs).
So when using --dereference option, it will dereference the tag into the
object the tag refers to, and provide information about it instead.

Perhaps the AB should use in it's properties (in Git checkout step) git
rev-parse <tag>^0 to dereference the tag instead of git rev-parse <tag>
From the man-page:

       <rev>^{<type>}, e.g. v0.99.8^{commit}
           A suffix ^ followed by an object type name enclosed in brace
pair
           means the object could be a tag, and dereference the tag
           recursively until an object of that type is found or the
object
           cannot be dereferenced anymore (in which case, barf).
<rev>^0 is a
           short-hand for <rev>^{commit}.


Cheers,

Stefan



> Cheers,
> Stefan
>  
> 
> 
> 
> > Cheers,
> > 
> > Stefan
> > 
> > 
> > 
> > _______________________________________________
> > yocto mailing list
> > yocto at yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/yocto
> 
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto



More information about the yocto mailing list