From: Felipe Contreras Date: Sat, 28 Sep 2013 22:03:30 GMT Subject: [PATCH v2 05/44] request-pull: use appropriate ref Message-ID: <1380405849-13000-6-git-send-email-felipe.contreras@gmail.com> In-Reply-To: <1380405849-13000-1-git-send-email-felipe.contreras@gmail.com> "Are you sure you pushed 'HEAD'?" doesn't say anything helpful. Signed-off-by: Felipe Contreras --- 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