request-pull: explicitly ask tags/$name to be pulled

When asking for a tag to be pulled, disambiguate by leaving tags/ prefix in front of the name of the tag. E.g. ... in the git repository at: git://example.com/git/git.git/ tags/v1.2.3 for you to fetch changes up to 123456... This way, older versions of "git pull" can be used to respond to such a request more easily, as "git pull $URL v1.2.3" did not DWIM to fetch v1.2.3 tag in older versions. Also this makes it clearer for humans that the pull request is made for a tag and he should anticipate a signed one. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Jan 31, 2012 at 21:06 UTC 2ad9ba0382ca0d9a36746db804d1bf01f5281b8e
3 files changed +4 -8
Documentation/howto/using-signed-tag-in-pull-request.txt
+2 -2
@@ -109,7 +109,7 @@ The resulting msg.txt file begins like so:
109
110 are available in the git repository at:
111
112 - example.com:/git/froboz.git frotz-for-xyzzy
112 + example.com:/git/froboz.git tags/frotz-for-xyzzy
113
114 for you to fetch changes up to 703f05ad5835c...:
115
@@ -141,7 +141,7 @@ After receiving such a pull request message, the integrator fetches and
141 integrates the tag named in the request, with:
142
143 ------------
144 - $ git pull example.com:/git/froboz.git/ frotz-for-xyzzy
144 + $ git pull example.com:/git/froboz.git/ tags/frotz-for-xyzzy
145 ------------
146
147 This operation will always open an editor to allow the integrator to fine
git-request-pull.sh
+1 -1
@@ -63,7 +63,7 @@ die "fatal: No commits in common between $base and $head"
63 find_matching_ref='
64 sub abbr {
65 my $ref = shift;
66 - if ($ref =~ s|refs/heads/|| || $ref =~ s|refs/tags/||) {
66 + if ($ref =~ s|^refs/heads/|| || $ref =~ s|^refs/tags/|tags/|) {
67 return $ref;
68 } else {
69 return $ref;
t/t5150-request-pull.sh
+1 -5
@@ -179,11 +179,7 @@ test_expect_success 'request names an appropriate branch' '
179 read repository &&
180 read branch
181 } <digest &&
182 - {
183 - test "$branch" = full ||
184 - test "$branch" = master ||
185 - test "$branch" = for-upstream
186 - }
182 + test "$branch" = tags/full
183
184 '
185