From: Johannes Sixt Date: Sat, 9 Jun 2007 20:34:16 +0000 (+0200) Subject: git-remote show: Also shorten non-fast-forward refs in the 'push' listing X-Git-Tag: v1.5.3-rc0~106 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6718f1f0d07167128c2d23c15081ea5660e865e9;p=git.git git-remote show: Also shorten non-fast-forward refs in the 'push' listing 'git-remote show remote-name' lists the refs that are pushed to the remote by showing the 'Push' line from the config file. But before showing it, it shortened 'refs/heads/here:refs/heads/there' to 'here:there'. However, if the Push line is prefixed with a plus, the ref was not shortened. Signed-off-by: Johannes Sixt Signed-off-by: Junio C Hamano --- diff --git a/git-remote.perl b/git-remote.perl index 576379912..b59cafdf8 100755 --- a/git-remote.perl +++ b/git-remote.perl @@ -258,6 +258,7 @@ sub show_remote { if ($info->{'PUSH'}) { my @pushed = map { s|^refs/heads/||; + s|^\+refs/heads/|+|; s|:refs/heads/|:|; $_; } @{$info->{'PUSH'}};