Linus Torvalds <> writes:

> Yes, so you'll get a warning (or, if you get a partial match, maybe
> not even that), but the important part about all these changes is that
> Why? Because it no longer re-writes the target branch name based on
> that match or non-match. So the pull request will be fine.

Will be fine, provided if they always use local:remote syntax, I'd

> In other words, the really fundamental change here i that the "oops, I
> couldn't find things on the remote" no longer affects the output. It
> only affects the warning. And I think that's important.
> It used to be that the remote matching actually changed the output of
> the request-pull, and *THAT* was the fundamental problem.

The fingers of users can be retrained to use the local:remote syntax
after we apologize for this change in the Release Notes, I see only
one issue (we seem to lose the message from the annotated/signed tag
when asking to pull it) remaining, after looking at what updates are
needed for t5150.


-- >8 --
Subject: [PATCH] pull-request: test updates

This illustrates behaviour changes that result from the recent
change by Linus.  Most shows good changes, but there may be
usability regressions:

 - The command continues to fail when the user forgot to push out
   before running the command, but the wording of the message has
   been slightly changed.

 - The command no longer guesses when asked to request the commit at
   the HEAD be pulled after pushing it to a branch 'for-upstream',
   even when that branch points at the correct commit.  The user
   must ask the command with the new "master:for-upstream" syntax.

 - The command no longer favours a tag that peels to the requested
   commit over a branch that points at the same commit.  This needs
   to be asked explicitly by specifying the tag object, not the
   commit.  But somehow this does not see to work (yet); somewhere
   the "tag-ness" of the requested ref seems to be lost.

The new behaviour needs to be documented in any case, but we need to
agree what the new behaviour should be before doing so, so...

Signed-off-by: Junio C Hamano <>
 t/ | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/t/ b/t/
index 1afa0d5..412ee4f 100755
--- a/t/
+++ b/t/
@@ -86,7 +86,7 @@ test_expect_success 'setup: two scripts for reading pull 
requests' '
        s/[-0-9]\{10\} [:0-9]\{8\} [-+][0-9]\{4\}/DATE/g
        s/        [^ ].*/        SUBJECT/g
        s/  [^ ].* (DATE)/  SUBJECT (DATE)/g
-       s/for-upstream/BRANCH/g
+       s|tags/full|BRANCH|g
        s/^version [0-9]/VERSION/
        /^ FILENAME | *[0-9]* [-+]*\$/ b diffstat
@@ -127,7 +127,7 @@ test_expect_success 'pull request when forgot to push' '
                test_must_fail git request-pull initial "$downstream_url" \
        ) &&
-       grep "No branch of.*is at:\$" err &&
+       grep "No match for commit .*" err &&
        grep "Are you sure you pushed" err
@@ -141,7 +141,7 @@ test_expect_success 'pull request after push' '
                git checkout initial &&
                git merge --ff-only master &&
                git push origin master:for-upstream &&
-               git request-pull initial origin >../request
+               git request-pull initial origin master:for-upstream >../request
        ) &&
        sed -nf read-request.sed <request >digest &&
        cat digest &&
@@ -160,7 +160,7 @@ test_expect_success 'pull request after push' '
-test_expect_success 'request names an appropriate branch' '
+test_expect_success 'request asks HEAD to be pulled' '
        rm -fr downstream.git &&
        git init --bare downstream.git &&
@@ -179,11 +179,11 @@ test_expect_success 'request names an appropriate branch' 
                read repository &&
                read branch
        } <digest &&
-       test "$branch" = tags/full
+       test -z "$branch"
-test_expect_success 'pull request format' '
+test_expect_failure 'pull request format' '
        rm -fr downstream.git &&
        git init --bare downstream.git &&
@@ -212,8 +212,8 @@ test_expect_success 'pull request format' '
                cd local &&
                git checkout initial &&
                git merge --ff-only master &&
-               git push origin master:for-upstream &&
-               git request-pull initial "$downstream_url" >../request
+               git push origin tags/full &&
+               git request-pull initial "$downstream_url" tags/full >../request
        ) &&
        <request sed -nf fuzz.sed >request.fuzzy &&
        test_i18ncmp expect request.fuzzy
@@ -229,7 +229,7 @@ test_expect_success 'request-pull ignores 
                git checkout initial &&
                git merge --ff-only master &&
                git push origin master:for-upstream &&
-               git request-pull -- initial "$downstream_url" >../request
+               git request-pull -- initial "$downstream_url" 
master:for-upstream >../request

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to