[PATCH] git-remote show: Also shorten non-fast-forward refs in the 'push' listing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



'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@xxxxxxxxxx>
---
 git-remote.perl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/git-remote.perl b/git-remote.perl
index 5763799..b59cafd 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'}};
-- 
1.5.2

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux