puppetlabs/puppetlabs-vcsrepo — pull request #224 by gajdaw (2014-12-23 07:39:38+00:00)
Title: Shallow clone with one commit that corresponds to arbitrary tag from arbitrary branch

I try to clone a single revision from arbitrary branch. Something like:

git clone --depth 1 --branch v2.6.1 https://github.com/symfony/symfony-standard.git

Here: v2.6.1 is a tag. And I want to clone only one revision: the one that corresponds to this tag.

The following configuration:

vcsrepo { '/home/vagrant/p01':
provider => 'git',
source => 'https://github.com/symfony/symfony-standard.git',
user => 'vagrant',
revision => 'v2.6.1',
depth => 1
}

fails producing the error:

Error: Execution of '/bin/su vagrant -c git checkout --force v2.6.1' returned 1:
error: pathspec 'v2.6.1' did not match any file(s) known to git.

I think `branch` parameter is necessary.

I have already made one PR: #212

This time I removed superfluous parameter `--single-branch`.

What do you think @sodabrew?