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

Signed-off-by: Felipe Contreras <felipe.contre...@gmail.com>
 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"
+       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
 exit $status

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

Reply via email to