[PATCH v2 05/44] request-pull: use appropriate ref

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

 



"Are you sure you pushed 'HEAD'?" doesn't say anything helpful.

Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx>
---
 git-request-pull.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/git-request-pull.sh b/git-request-pull.sh
index 3c9a982..3e510ca 100755
--- a/git-request-pull.sh
+++ b/git-request-pull.sh
@@ -151,9 +151,10 @@ git diff -M --stat --summary $patch $merge_base..$headrev || status=1
 
 if test -z "$ref"
 then
+	short_headref=$(git rev-parse -q --verify --symbolic-full-name --abbrev-ref "$head")
 	echo "warn: No branch of $url is at:" >&2
 	git show -s --format='warn:   %h: %s' $headrev >&2
-	echo "warn: Are you sure you pushed '$head' there?" >&2
+	echo "warn: Are you sure you pushed '$short_headref' there?" >&2
 	status=1
 fi
 exit $status
-- 
1.8.4-fc

--
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]