From: Junio C Hamano <gitster@pobox.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Tejun Heo <tj@kernel.org>, Git Mailing List <git@vger.kernel.org>,
Jeff King <peff@peff.net>
Subject: Re: [RFC PATCH 2/1] Make request-pull able to take a refspec of form local:remote
Date: Thu, 23 Jan 2014 14:58:31 -0800 [thread overview]
Message-ID: <xmqqsises3u0.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CA+55aFyGaaMOL5pBhZ1BHMr07oDi2MuS-fPu4nnxhjoy+F0AQw@mail.gmail.com> (Linus Torvalds's message of "Thu, 23 Jan 2014 11:57:30 -0800")
Linus Torvalds <torvalds@linux-foundation.org> 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
> it DOESN'T MATTER.
>
> 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
agree.
> 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.
Thanks.
-- >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 <gitster@pobox.com>
---
t/t5150-request-pull.sh | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/t/t5150-request-pull.sh b/t/t5150-request-pull.sh
index 1afa0d5..412ee4f 100755
--- a/t/t5150-request-pull.sh
+++ b/t/t5150-request-pull.sh
@@ -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/mnemonic.txt/FILENAME/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" \
2>../err
) &&
- 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 OPTIONS_KEEPDASHDASH poison' '
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
)
'
--
1.9-rc0-250-ge2d8c96
next prev parent reply other threads:[~2014-01-23 22:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-23 0:06 [RFC PATCH 2/1] Make request-pull able to take a refspec of form local:remote Linus Torvalds
2014-01-23 19:43 ` Junio C Hamano
2014-01-23 19:57 ` Linus Torvalds
2014-01-23 22:58 ` Junio C Hamano [this message]
2014-01-23 23:56 ` Linus Torvalds
2014-01-24 20:16 ` Junio C Hamano
2014-01-29 23:34 ` Re* " Junio C Hamano
2014-01-30 0:16 ` brian m. carlson
2014-01-30 0:40 ` Linus Torvalds
2014-02-25 21:44 ` Junio C Hamano
2014-03-12 18:04 ` Junio C Hamano
2014-03-12 23:18 ` Eric Sunshine
2014-03-13 21:22 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqsises3u0.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.