X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=contrib%2Fexamples%2Fgit-remote.perl;h=b17952a785d9e45dea8a71c211f76f0271e659da;hb=d49483f0ca1be0994c4f20fe1804d36a28013676;hp=b30ed734e7102b6a5d88c01364fa7d18db8f8bfe;hpb=92798702cf6d201f80e257a07d0a0c40565c79fe;p=git.git diff --git a/contrib/examples/git-remote.perl b/contrib/examples/git-remote.perl index b30ed734e..b17952a78 100755 --- a/contrib/examples/git-remote.perl +++ b/contrib/examples/git-remote.perl @@ -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; } @@ -312,7 +309,7 @@ sub update_remote { } } } else { - print STDERR "Remote group $name does not exists.\n"; + print STDERR "Remote group $name does not exist.\n"; exit(1); } for (@remotes) {