nesi / puppet-git

22 stars 49 forks source link

git_tag potentailly does not work #19

Open esc opened 11 years ago

esc commented 11 years ago

I am using the following puppet code:

class{git:
  svn => false,
  gui => false,
}

class cgit {
  git::repo{'cgit':
    path    => '/usr/local/src/cgit',
    source  => 'git://git.zx2c4.com/cgit',
    git_tag => 'v0.9.1',
  }

}

I am expecting this to clone the repo and check out the tag `v0.9.1`` But when I go to check which version is actually checked out I see:

root@precise32:/usr/local/src/cgit# git describe
v0.9.1-88-g7966fd9

And not:

root@precise32:/usr/local/src/cgit# git describe
v0.9.1

Any ideas? Or is it an error on my part (am new to puppet).

Aethylred commented 11 years ago

Hmm, the last part is the shortened hash. I'll have to look into it further and see if I can replicate the behavior.

esc commented 11 years ago

Here is how the describe output is to be interpreted:

v0.9.1-88-g7966fd9
   ^    ^ ^   ^
   |    | |   |
   |    | |   +--- Abbreviated ID (SHA1) of the commit
   |    | +------- 'g' means this identifier was generated by git
   |    +--------- 88 commits ahead of the closest reachable tag in the DAG
   +-------------- The closest reachable tag

Hope that helps.