git: Don't use refs/tags/ on initial clone, part 2.

Turns out the original code was doubly-broken, since
determinePreferredCheckoutSource was already adding refs/tags/ to
returned git tags.

Rather than possibly breaking other users of that function by removing
it there, instead strip off refs/tags/ during clone if present.
wilder
Michael Pyne 8 years ago
parent 2d3b152cf7
commit d755448a68
  1. 1
      modules/ksb/Updater/Git.pm

@ -106,6 +106,7 @@ sub _clone
p_chdir($module->getSourceDir()); p_chdir($module->getSourceDir());
my ($commitId, $commitType) = $self->_determinePreferredCheckoutSource($module); my ($commitId, $commitType) = $self->_determinePreferredCheckoutSource($module);
$commitId =~ s,^refs/tags/,,; # git-clone -b doesn't like refs/tags/
unshift @args, '-b', $commitId; # Checkout branch right away unshift @args, '-b', $commitId; # Checkout branch right away
if (0 != log_command($module, 'git-clone', ['git', 'clone', @args])) { if (0 != log_command($module, 'git-clone', ['git', 'clone', @args])) {

Loading…
Cancel
Save