mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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>
This commit is contained in:
@@ -63,7 +63,7 @@ die "fatal: No commits in common between $base and $head"
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user