From: Junio C Hamano <gitster@pobox•com>
To: Paolo Bonzini <bonzini@gnu•org>
Cc: git@vger•kernel.org, Paolo Bonzini <pbonzini@redhat•com>,
Linus Torvalds <torvalds@linux-foundation•org>
Subject: Re: [PATCH 0/3] request-pull: do something if $3 is passed
Date: Mon, 16 Feb 2015 11:47:55 -0800 [thread overview]
Message-ID: <xmqqiof163kk.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1424110568-29479-1-git-send-email-bonzini@gnu.org> (Paolo Bonzini's message of "Mon, 16 Feb 2015 19:16:05 +0100")
Paolo Bonzini <bonzini@gnu•org> writes:
> From: Paolo Bonzini <pbonzini@redhat•com>
>
> After updating to git 2.3.0, "git request-pull" is stubbornly complaining
> that I lack a matching tag on the remote side unless I pass the third
> argument. But I did prepare and push a signed tag.
A few questions.
- what old version did you update from? I think the "correct
over-eager dwimming" change was from v2.0 days.
- what exactly do you mean by "stubbornly complain"? I think we
say something about HEAD not matching the HEAD over there, which
I think is bogus (we should instead say things about the branch
you are on and the branch over there with the same name) and is
worth fixing.
> This looks like a bug to me; when $3 is not passed git will try to use
> "HEAD" as the default but it cannot be resolved to a tag, neither locally
> (patch 2) nor remotely (patch 3).
An earlier 024d34cb (request-pull: more strictly match local/remote
branches, 2014-01-22) deliberately disabled over-eager DWIMming when
the $3-rd argument _is_ given. It didn't say much about what should
happen when it is missing.
I am torn about your changes.
One part of me feel that not giving the $3-rd argument should behave
the same way as if you gave the name of the current branch as the
$3-rd argument. DWIMming from local HEAD to a local branch name
(e.g. 'master') may be OK and necessary (I already said it is worth
fixing above). But we should not be resurrecting the over-eager
DWIMming from that point---not from a local branch name to a tag
that points at it, which was what 024d34cb wanted to forbid.
On the other hand, I can also understand (not necessarily agree
with) a view that not giving the $3-rd argument is an explicit
user's wish to us to DWIM as much as we want. But again, that
directly contradicts with the desire of 024d34cb.
So,... I dunno.
I'd be more comfortable if 2/3 and 3/3 were replaced with something
like "do not ask HEAD to be pulled, but always require a specific
ref to be pulled", by dereferencing HEAD locally to a branch name,
and behave as if that name was given to $3 from the command line,
without doing any other changes (like turning that branch name that
was implicitly given into a tag that happens to point at it).
Thanks.
>
> Patch 1 is a simple testcase fix.
>
> Paolo
>
> Paolo Bonzini (3):
> request-pull: fix expected format in tests
> request-pull: use "git tag --points-at" to detect local tags
> request-pull: find matching tag or branch name on remote side
>
> git-request-pull.sh | 15 +++++++++++----
> t/t5150-request-pull.sh | 5 ++---
> 2 files changed, 13 insertions(+), 7 deletions(-)
next prev parent reply other threads:[~2015-02-16 19:48 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-16 18:16 [PATCH 0/3] request-pull: do something if $3 is passed Paolo Bonzini
2015-02-16 18:16 ` [PATCH 1/3] request-pull: fix expected format in tests Paolo Bonzini
2015-02-16 18:16 ` [PATCH 2/3] request-pull: use "git tag --points-at" to detect local tags Paolo Bonzini
2015-02-16 18:16 ` [PATCH 3/3] request-pull: find matching tag or branch name on remote side Paolo Bonzini
2015-02-16 19:47 ` Junio C Hamano [this message]
2015-02-17 10:12 ` [PATCH 0/3] request-pull: do something if $3 is passed Paolo Bonzini
2015-02-17 19:57 ` Junio C Hamano
2015-02-17 20:34 ` Paolo Bonzini
2015-02-17 20:42 ` Linus Torvalds
2015-02-17 20:53 ` Paolo Bonzini
2015-02-17 21:04 ` Linus Torvalds
2015-02-17 21:10 ` Paolo Bonzini
2015-02-17 21:18 ` Linus Torvalds
2015-02-18 7:11 ` Junio C Hamano
2015-02-17 21:03 ` Junio C Hamano
2015-02-17 21:08 ` Linus Torvalds
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=xmqqiof163kk.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=bonzini@gnu$(echo .)org \
--cc=git@vger$(echo .)kernel.org \
--cc=pbonzini@redhat$(echo .)com \
--cc=torvalds@linux-foundation$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox