Skip to content

Commit d8d7094

Browse files
committed
Grok symbolic references
1 parent c0eaf89 commit d8d7094

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/Git/PurePerl.pm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ sub ref_sha1 {
170170
my $sha1 = file($file)->slurp
171171
|| confess("Error reading $file: $!");
172172
chomp $sha1;
173+
return $self->ref_sha1($1) if $sha1 =~ /^ref: (.*)/;
173174
return $sha1;
174175
}
175176
}
@@ -180,6 +181,7 @@ sub ref_sha1 {
180181
next if $line =~ /^#/;
181182
my ( $sha1, my $name ) = split ' ', $line;
182183
if ( $name eq $wantref ) {
184+
return $self->ref_sha1($1) if $sha1 =~ /^ref: (.*)/;
183185
return $sha1;
184186
}
185187
}

0 commit comments

Comments
 (0)