From d755448a68707c9b5109d2da332dfcbe68ed334e Mon Sep 17 00:00:00 2001 From: Michael Pyne Date: Sun, 25 Mar 2018 13:32:29 -0400 Subject: [PATCH] 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. --- modules/ksb/Updater/Git.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/ksb/Updater/Git.pm b/modules/ksb/Updater/Git.pm index 458eafa..eee1230 100644 --- a/modules/ksb/Updater/Git.pm +++ b/modules/ksb/Updater/Git.pm @@ -106,6 +106,7 @@ sub _clone p_chdir($module->getSourceDir()); 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 if (0 != log_command($module, 'git-clone', ['git', 'clone', @args])) {