aboutsummaryrefslogtreecommitdiffstats
path: root/lib/LXRng/Repo/Git.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/LXRng/Repo/Git.pm')
-rw-r--r--lib/LXRng/Repo/Git.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/LXRng/Repo/Git.pm b/lib/LXRng/Repo/Git.pm
index 7407ca0..946c73f 100644
--- a/lib/LXRng/Repo/Git.pm
+++ b/lib/LXRng/Repo/Git.pm
@@ -112,10 +112,10 @@ sub node {
$path =~ s,/+$,,;
if ($path eq '') {
- open(my $tag, '<', $$self{'root'}.'/refs/tags/'.$release)
- or return undef;
- my $ref = <$tag>;
- close($tag);
+ my $git = $self->_git_cmd('rev-list', '--max-count=1', $release);
+ my $ref = <$git>;
+ return undef unless $git =~ /\S/;
+ close($git);
chomp($ref);
return LXRng::Repo::Git::Directory->new($self, '', $ref);
}