Merge branch 'lt/request-pull'
authorJunio C Hamano <gitster@pobox.com>
Mon, 19 May 2014 17:35:36 +0000 (10:35 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 19 May 2014 17:35:36 +0000 (10:35 -0700)
* lt/request-pull:
request-pull: resurrect for-linus -> tags/for-linus DWIM

git-request-pull.sh
t/t5150-request-pull.sh
index 5c1599752314696ef1f317095d1786493fbfc935..d5500fde4658410db477008617730cb5799f310e 100755 (executable)
@@ -119,6 +119,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:
index 75d6b3843ad4070f225e82aec160eca494ab6238..93e2c65de65f8dd8544332dd512e6d61dad1746c 100755 (executable)
@@ -223,7 +223,13 @@ test_expect_success 'pull request format' '
                git request-pull initial "$downstream_url" tags/full:refs/tags/full
        ) >request &&
        sed -nf fuzz.sed <request >request.fuzzy &&
-       test_i18ncmp expect request.fuzzy
+       test_i18ncmp expect request.fuzzy &&
+
+       (
+               cd local &&
+               git request-pull initial "$downstream_url" full
+       ) >request &&
+       grep ' tags/full$'
 '
 
 test_expect_success 'request-pull ignores OPTIONS_KEEPDASHDASH poison' '