Skip to content

Commit 6718f1f

Browse files
Johannes Sixtgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9a7d941 commit 6718f1f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

git-remote.perl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ sub show_remote {
258258
if ($info->{'PUSH'}) {
259259
my @pushed = map {
260260
s|^refs/heads/||;
261+
s|^\+refs/heads/|+|;
261262
s|:refs/heads/|:|;
262263
$_;
263264
} @{$info->{'PUSH'}};

0 commit comments

Comments
 (0)