summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-12-16 17:00:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-12-16 17:25:20 (GMT)
commitfe46fa9d267fc5465b320d0d2877de45333efeb8 (patch)
treeea2f0a6328e601f9bd83b1b6e36ffa8693d13dc5 /t
parentd050464541d51ab65863218d93b351de3392f476 (diff)
downloadgit-fe46fa9d267fc5465b320d0d2877de45333efeb8.zip
git-fe46fa9d267fc5465b320d0d2877de45333efeb8.tar.gz
git-fe46fa9d267fc5465b320d0d2877de45333efeb8.tar.bz2
request-pull: update the "pull" command generation logic
The old code that insisted on asking for the tip of a branch to be pulled were not updated when we started allowing for a tag to be pulled. When a tag points at an older part of the history and there is no branch that points at the tagged commit, the script failed to say which ref is to be pulled. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t5150-request-pull.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/t/t5150-request-pull.sh b/t/t5150-request-pull.sh
index ea6f692..aec842f 100755
--- a/t/t5150-request-pull.sh
+++ b/t/t5150-request-pull.sh
@@ -67,9 +67,11 @@ test_expect_success 'setup: two scripts for reading pull requests' '
cat <<-\EOT >read-request.sed &&
#!/bin/sed -nf
+ # Note that a request could ask for "tag $tagname"
/ in the git repository at:$/!d
n
/^$/ n
+ s/ tag \([^ ]*\)$/ tag--\1/
s/^[ ]*\(.*\) \([^ ]*\)/please pull\
\1\
\2/p
@@ -178,6 +180,7 @@ test_expect_success 'request names an appropriate branch' '
read branch
} <digest &&
{
+ test "$branch" = tag--full ||
test "$branch" = master ||
test "$branch" = for-upstream
}