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 <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
9a7d941056
commit
6718f1f0d0
@ -258,6 +258,7 @@ sub show_remote {
|
|||||||
if ($info->{'PUSH'}) {
|
if ($info->{'PUSH'}) {
|
||||||
my @pushed = map {
|
my @pushed = map {
|
||||||
s|^refs/heads/||;
|
s|^refs/heads/||;
|
||||||
|
s|^\+refs/heads/|+|;
|
||||||
s|:refs/heads/|:|;
|
s|:refs/heads/|:|;
|
||||||
$_;
|
$_;
|
||||||
} @{$info->{'PUSH'}};
|
} @{$info->{'PUSH'}};
|
||||||
|
Reference in New Issue
Block a user