{"thread":{"id":"29497","subject":"[PATCH] request-pull: explicitly ask tags/$name to be pulled","startedAt":"2012-02-01T05:50:21Z","lastAt":"2012-02-01T05:50:21Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"183458","messageId":"7vty3b3xwi.fsf@alter.siamese.dyndns.org","threadId":"29497","inReplyTo":null,"subject":"[PATCH] request-pull: explicitly ask tags/$name to be pulled","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-02-01T05:50:21Z","receivedAt":"2012-02-01T05:50:21Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"When asking for a tag to be pulled, disambiguate by leaving tags/ prefix\nin front of the name of the tag. E.g.\n\n    ... in the git repository at:\n\n      git://example.com/git/git.git/ tags/v1.2.3\n\n    for you to fetch changes up to 123456...\n\nThis way, older versions of \"git pull\" can be used to respond to such a\nrequest more easily, as \"git pull $URL v1.2.3\" did not DWIM to fetch\nv1.2.3 tag in older versions. Also this makes it clearer for humans that\nthe pull request is made for a tag and he should anticipate a signed one.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * http://thread.gmane.org/gmane.linux.kernel/1245709/focus=1245909\n   triggered this\n\n .../howto/using-signed-tag-in-pull-request.txt     |    4 ++--\n git-request-pull.sh                                |    2 +-\n t/t5150-request-pull.sh                            |    6 +-----\n 3 files changed, 4 insertions(+), 8 deletions(-)\n\ndiff --git a/Documentation/howto/using-signed-tag-in-pull-request.txt b/Documentation/howto/using-signed-tag-in-pull-request.txt\nindex a1351c5..98c0033 100644\n--- a/Documentation/howto/using-signed-tag-in-pull-request.txt\n+++ b/Documentation/howto/using-signed-tag-in-pull-request.txt\n@@ -109,7 +109,7 @@ The resulting msg.txt file begins like so:\n \n  are available in the git repository at:\n \n-   example.com:/git/froboz.git frotz-for-xyzzy\n+   example.com:/git/froboz.git tags/frotz-for-xyzzy\n \n  for you to fetch changes up to 703f05ad5835c...:\n \n@@ -141,7 +141,7 @@ After receiving such a pull request message, the integrator fetches and\n integrates the tag named in the request, with:\n \n ------------\n- $ git pull example.com:/git/froboz.git/ frotz-for-xyzzy\n+ $ git pull example.com:/git/froboz.git/ tags/frotz-for-xyzzy\n ------------\n \n This operation will always open an editor to allow the integrator to fine\ndiff --git a/git-request-pull.sh b/git-request-pull.sh\nindex 64960d6..e6438e2 100755\n--- a/git-request-pull.sh\n+++ b/git-request-pull.sh\n@@ -63,7 +63,7 @@ die \"fatal: No commits in common between $base and $head\"\n find_matching_ref='\n \tsub abbr {\n \t\tmy $ref = shift;\n-\t\tif ($ref =~ s|refs/heads/|| || $ref =~ s|refs/tags/||) {\n+\t\tif ($ref =~ s|^refs/heads/|| || $ref =~ s|^refs/tags/|tags/|) {\n \t\t\treturn $ref;\n \t\t} else {\n \t\t\treturn $ref;\ndiff --git a/t/t5150-request-pull.sh b/t/t5150-request-pull.sh\nindex da25bc2..7c1dc64 100755\n--- a/t/t5150-request-pull.sh\n+++ b/t/t5150-request-pull.sh\n@@ -179,11 +179,7 @@ test_expect_success 'request names an appropriate branch' '\n \t\tread repository &&\n \t\tread branch\n \t} <digest &&\n-\t{\n-\t\ttest \"$branch\" = full ||\n-\t\ttest \"$branch\" = master ||\n-\t\ttest \"$branch\" = for-upstream\n-\t}\n+\ttest \"$branch\" = tags/full\n \n '\n \n-- \n1.7.9.155.gf6ee6\n"}]}