Skip to content

Commit

Permalink
git-remote show: Also shorten non-fast-forward refs in the 'push' lis…
Browse files Browse the repository at this point in the history
…ting

'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 <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Johannes Sixt authored and Junio C Hamano committed Jun 13, 2007
1 parent 9a7d941 commit 6718f1f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions git-remote.perl
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ sub show_remote {
if ($info->{'PUSH'}) {
my @pushed = map {
s|^refs/heads/||;
s|^\+refs/heads/|+|;
s|:refs/heads/|:|;
$_;
} @{$info->{'PUSH'}};
Expand Down

0 comments on commit 6718f1f

Please sign in to comment.