Skip to content

Commit 202ee25

Browse files
committed
sometimes the file with packed refs will contain lines that contain a sha, preceded by '^' and no ref name, those mean that the listed sha is an alternative for the preceding ref name
1 parent d7fa562 commit 202ee25

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/Git/PurePerl.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ sub ref_names {
155155
if ( -f $packed_refs ) {
156156
foreach my $line ( $packed_refs->slurp( chomp => 1 ) ) {
157157
next if $line =~ /^#/;
158+
next if $line =~ /^\^/;
158159
my ( $sha1, my $name ) = split ' ', $line;
159160
push @names, $name;
160161
}

0 commit comments

Comments
 (0)