summaryrefslogtreecommitdiff
path: root/git-request-pull.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-05-16 17:18:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-05-16 17:18:25 (GMT)
commitd952cbb1908b54c6a04f37c8b0924a49cdb5997d (patch)
tree76bfb38d3056b6ef6afcd76aaed2230db0d68d9e /git-request-pull.sh
parentec445074e0ac4d6003acd21c512c43c8fdb8be86 (diff)
downloadgit-d952cbb1908b54c6a04f37c8b0924a49cdb5997d.zip
git-d952cbb1908b54c6a04f37c8b0924a49cdb5997d.tar.gz
git-d952cbb1908b54c6a04f37c8b0924a49cdb5997d.tar.bz2
request-pull: resurrect for-linus -> tags/for-linus DWIM
Older versions of Git before v1.7.10 did not DWIM $ git pull $URL for-linus to the tag "tags/for-linus" and the users were required to say $ git pull $URL tags/for-linus instead. Because newer versions of Git works either way, request-pull used to show tags/for-linus when asked $ git request-pull origin/master $URL for-linus The recent updates broke this and in the output we see "for-linus" without the "tags/" prefix. As v1.7.10 is more than 2 years old, this should matter very little in practice, but resurrecting it is very simple. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-request-pull.sh')
-rwxr-xr-xgit-request-pull.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/git-request-pull.sh b/git-request-pull.sh
index b67513a..d6648b2 100755
--- a/git-request-pull.sh
+++ b/git-request-pull.sh
@@ -118,6 +118,12 @@ then
status=1
fi
+# Special case: turn "for_linus" to "tags/for_linus" when it is correct
+if test "$ref" = "refs/tags/$pretty_remote"
+then
+ pretty_remote=tags/$pretty_remote
+fi
+
url=$(git ls-remote --get-url "$url")
git show -s --format='The following changes since commit %H: