path: root/t
diff options
authorJunio C Hamano <>2011-12-16 17:00:11 (GMT)
committerJunio C Hamano <>2011-12-16 17:25:20 (GMT)
commitfe46fa9d267fc5465b320d0d2877de45333efeb8 (patch)
treeea2f0a6328e601f9bd83b1b6e36ffa8693d13dc5 /t
parentd050464541d51ab65863218d93b351de3392f476 (diff)
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 <>
Diffstat (limited to 't')
1 files changed, 3 insertions, 0 deletions
diff --git a/t/ b/t/
index ea6f692..aec842f 100755
--- a/t/
+++ b/t/
@@ -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
+ s/ tag \([^ ]*\)$/ tag--\1/
s/^[ ]*\(.*\) \([^ ]*\)/please pull\
@@ -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