[PATCH v2 03/44] request-pull: fix annotated tag check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The was just not doing anything, reporting an appropriately tagged ref
worked only by luck.

Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx>
---
 git-request-pull.sh     |  2 +-
 t/t5150-request-pull.sh | 15 +++++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/git-request-pull.sh b/git-request-pull.sh
index ebf1269..6348dac 100755
--- a/git-request-pull.sh
+++ b/git-request-pull.sh
@@ -89,7 +89,7 @@ find_matching_ref='
 		my ($sha1, $ref, $deref) = /^(\S+)\s+(\S+?)(\^\{\})?$/;
 		next unless ($sha1 eq $ARGV[1]);
 		$found = abbr($ref);
-		if ($deref && $ref eq "tags/$ARGV[2]") {
+		if ($deref && $ref eq "refs/tags/$ARGV[2]") {
 			$tagged = $found;
 			last;
 		}
diff --git a/t/t5150-request-pull.sh b/t/t5150-request-pull.sh
index 1afa0d5..54f41bf 100755
--- a/t/t5150-request-pull.sh
+++ b/t/t5150-request-pull.sh
@@ -234,4 +234,19 @@ test_expect_success 'request-pull ignores OPTIONS_KEEPDASHDASH poison' '
 
 '
 
+test_expect_success 'pull request when pushed tag' '
+	rm -fr downstream.git &&
+	git init --bare downstream.git &&
+	(
+		cd local &&
+		git checkout initial &&
+		git merge --ff-only master &&
+		git tag zeebra &&
+		git push origin master:for-upstream full zeebra &&
+		git request-pull initial origin 2>../err
+	) &&
+	cat err &&
+	! grep "You locally have .* but it does not (yet)" err
+'
+
 test_done
-- 
1.8.4-fc

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]