Make it possible to abort the submission of a change to Perforce
[gitweb.git] / contrib / examples / git-remote.perl
index b30ed734e7102b6a5d88c01364fa7d18db8f8bfe..36bd54c985080f8dd5558a3e7a4e19ede9fbab93 100755 (executable)
@@ -129,10 +129,7 @@ sub update_ls_remote {
        return if (($harder == 0) ||
                   (($harder == 1) && exists $info->{'LS_REMOTE'}));
 
-       my @ref = map {
-               s|^[0-9a-f]{40}\s+refs/heads/||;
-               $_;
-       } $git->command(qw(ls-remote --heads), $info->{'URL'});
+       my @ref = map { s|refs/heads/||; $_; } keys %{$git->remote_refs($info->{'URL'}, [ 'heads' ])};
        $info->{'LS_REMOTE'} = \@ref;
 }