Commit 013246ae authored by Michael Pyne's avatar Michael Pyne
Browse files

Fix implementation of tag/revision support for git.

I somehow missed the case of "branch option not ever set" by using the
getOption method to grab the git branch instead of the specific build
system "getBranch" method that had been used before. This led to build
errors trying to dereference an undefined variable.

My apologies for the trouble.
parent c22b7b06
......@@ -2800,12 +2800,14 @@ EOF
# checkout a specific tag/SHA1/etc.
# We need to be wordy here to placate the Perl warning generator.
my @gitRefTypes = (
[qw/revision commit/], [qw/tag tag/], [qw/branch branch/],
[qw/revision commit/], [qw/tag tag/],
my $gitRefType = first { $module->getOption($_->[0]) } @gitRefTypes;
my ($branch, $type) = @$gitRefType;
my $gitRefType = (first { $module->getOption($_->[0]) } @gitRefTypes) //
['branch', 'branch'];
my ($chosenRefOption, $type) = @$gitRefType;
$branch = $module->getOption($branch);
my $branch = $type eq 'branch' ? $self->getBranch()
: $module->getOption($chosenRefOption);
note ("Updating g[$module] (to $type b[$branch])");
my $start_commit = $self->commit_id('HEAD');
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment