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

_verifyRefPresent was also broken for tag-based checkouts.  Since this
already uses determinePreferredCheckoutSource, which already used
refs/tags/ for tags, this code also doubled-up on tag names.

This whole code path would be a great candidate for that test suite
under t/ if I can ever get it polished up one day :(

To avoid commit spam, I've tested this on my own Qt module directories
by deleting them and forcing them to be checked-out with tags.
wilder
Michael Pyne 8 years ago
parent d755448a68
commit c9a364c33b
  1. 4
      modules/ksb/Updater/Git.pm

@ -73,9 +73,7 @@ sub _verifyRefPresent
return 1 if pretending();
my $ref = (($commitType eq 'branch') ? 'refs/heads/'
: ($commitType eq 'tag') ? 'refs/tags/'
: '') . $commitId;
my $ref = $commitId;
my $hashref = run_forked("git ls-remote --exit-code $repo $ref",
{ timeout => 10, discard_output => 1, terminate_on_parent_sudden_death => 1});

Loading…
Cancel
Save