X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=contrib%2Fexamples%2Fgit-remote.perl;h=36bd54c985080f8dd5558a3e7a4e19ede9fbab93;hb=88bbda08d7b9503862a8fb8846d78c67825e5e3d;hp=b30ed734e7102b6a5d88c01364fa7d18db8f8bfe;hpb=267123b4299ea2c2f090ef169f9fc5039897cd72;p=git.git diff --git a/contrib/examples/git-remote.perl b/contrib/examples/git-remote.perl index b30ed734e..36bd54c98 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; }