summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 11b17af)
raw | patch | inline | side by side (parent: 11b17af)
author | Junio C Hamano <gitster@pobox.com> | |
Wed, 1 Feb 2012 05:06:06 +0000 (21:06 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 1 Feb 2012 05:27:58 +0000 (21:27 -0800) |
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>
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>
Documentation/howto/using-signed-tag-in-pull-request.txt | patch | blob | history | |
git-request-pull.sh | patch | blob | history | |
t/t5150-request-pull.sh | patch | blob | history |
diff --git a/Documentation/howto/using-signed-tag-in-pull-request.txt b/Documentation/howto/using-signed-tag-in-pull-request.txt
index a1351c5bb8158b5b3aa1ddbbc875dd408fc2d0de..98c0033a55f25e8c157a580dbdadc941b33dfda0 100644 (file)
are available in the git repository at:
- example.com:/git/froboz.git frotz-for-xyzzy
+ example.com:/git/froboz.git tags/frotz-for-xyzzy
for you to fetch changes up to 703f05ad5835c...:
integrates the tag named in the request, with:
------------
- $ git pull example.com:/git/froboz.git/ frotz-for-xyzzy
+ $ git pull example.com:/git/froboz.git/ tags/frotz-for-xyzzy
------------
This operation will always open an editor to allow the integrator to fine
diff --git a/git-request-pull.sh b/git-request-pull.sh
index 64960d65a1c2bf3c260c8fd46c4b298ae870679f..e6438e24c7c787b55428a48eca9461d772db7ee6 100755 (executable)
--- a/git-request-pull.sh
+++ b/git-request-pull.sh
find_matching_ref='
sub abbr {
my $ref = shift;
- if ($ref =~ s|refs/heads/|| || $ref =~ s|refs/tags/||) {
+ if ($ref =~ s|^refs/heads/|| || $ref =~ s|^refs/tags/|tags/|) {
return $ref;
} else {
return $ref;
index da25bc2d1fb3a68b1d29b1a5b3f5d18f6c0ffdca..7c1dc641dec809fe314dcba7a4946154e8422f9b 100755 (executable)
--- a/t/t5150-request-pull.sh
+++ b/t/t5150-request-pull.sh
read repository &&
read branch
} <digest &&
- {
- test "$branch" = full ||
- test "$branch" = master ||
- test "$branch" = for-upstream
- }
+ test "$branch" = tags/full
'