From: Ramkumar Ramachandra <artagnon@gmail.com>
To: Jeff King <peff@peff.net>
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Jonathan Nieder" <jrnieder@gmail.com>,
"Git List" <git@vger.kernel.org>,
"Duy Nguyễn" <pclouds@gmail.com>
Subject: Re: [ITCH] Specify refspec without remote
Date: Thu, 11 Apr 2013 02:11:01 +0530 [thread overview]
Message-ID: <CALkWK0nfJezWbd3+VfA+DMqUNbekSJJJ539AmhQT37kkap_qeg@mail.gmail.com> (raw)
In-Reply-To: <20130410202105.GE24177@sigill.intra.peff.net>
Jeff King wrote:
> On Thu, Apr 11, 2013 at 01:35:34AM +0530, Ramkumar Ramachandra wrote:
>
>> Jeff King wrote:
>> > Maybe. But no more so than the current:
>> >
>> > git push
>> >
>> > which may also push master and next to the same remote.
>>
>> I would argue that this was not really a problem in practice, until I
>> introduced branch.<name>.pushremote.
>>
>> Let us imagine that I was working on artagnon/git.git (remote: ram), a
>> fork of git/git.git (remote: origin) earlier. My fork contains the
>> link and implicit-push branches in addition to the master, next and pu
>> branches, which are present on both. When I push from my
>> implicit-push branch with push.default = matching, I'm updating all
>> the matching refs on the remote ram (since branch.implicit-push.remote
>> is set to ram), which is fine. Now, I git push while on branch
>> master. My push is simply rejected, as I don't have write access to
>> the remote origin.
>>
>> This is designed exactly for the read-only upstream, read-write fork
>> scenario. If I had write access to upstream (where we're essentially
>> regression to a centralized model), we'd have some major confusion.
>
> I don't see how pushremote changes that. It was already a problem with
> branch.*.remote, no?
Technically, it changes nothing. pushremote is only an enabler for
more complex scenarios where git push; breaking user expectations is
magnified.
According to me, what branch.<name>.pushremote suddenly starts
supporting (apart from the use I intended for it) is each branch
having different read/ write access. So, we're back to git.git where
Junio has graciously given me write support to pu, but not next or
master. So I set up branch.master.pushremote and
branch.next.pushremote to ram and run git push; from pu. Disaster:
the pu ref went through fine, but master and next failed to get pushed
despite me specifying a proper pushremote for them.
> I have a similar remote setup in my git.git repository. But all of my
> branch.*.remote variables point to origin, because my branches are based
> off of Junio's master. A matching push goes to the wrong place (and I
> have screwed it up many times; it is nice that I do not have write
> access to Junio's repository). The is broken without having pushremote
> at all (and the proper fix is your remote.pushdefault).
Yeah, I can't believe I lived without remote.pushdefault for this long.
> If we are not going to break the existing behavior, I think it can be
> argued that consistency and simplicity of the rules is important, so the
> user can predict what will happen. But the more we discuss, the more I
> think we should simply change the current behavior (to stop respecting
> branch.* config with "matching"), which just seems wrong to me. Then we
> can be simple and consistent, and do what the user probably intended.
So there are some push.default options that respect branch.* config
(ie. "current"), and others that don't (ie. "matching"). I would
argue that push.default is badly designed to begin with, so the
solution makes sense to me even if the patch is a bit of hack; we
never guaranteed that the various push.default options respect the
same configuration variables.
next prev parent reply other threads:[~2013-04-10 20:41 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-18 16:58 [ITCH] Specify refspec without remote Ramkumar Ramachandra
2013-03-18 17:08 ` Jeff King
2013-03-19 9:58 ` Ramkumar Ramachandra
2013-03-19 10:02 ` Jeff King
2013-03-19 11:33 ` Duy Nguyen
2013-03-19 11:53 ` Ramkumar Ramachandra
2013-03-19 12:15 ` Duy Nguyen
2013-03-19 13:03 ` Holger Hellmuth (IKS)
2013-03-19 11:58 ` Holger Hellmuth (IKS)
2013-03-19 15:43 ` Junio C Hamano
2013-03-19 15:43 ` Junio C Hamano
2013-04-09 11:44 ` Ramkumar Ramachandra
2013-04-09 17:31 ` Junio C Hamano
2013-04-09 17:39 ` Ramkumar Ramachandra
2013-04-09 17:58 ` Junio C Hamano
2013-04-09 18:03 ` Ramkumar Ramachandra
2013-04-09 18:08 ` Ramkumar Ramachandra
2013-04-09 19:29 ` Junio C Hamano
2013-04-09 23:13 ` Jonathan Nieder
2013-04-09 23:14 ` Jonathan Nieder
2013-04-10 1:19 ` Junio C Hamano
2013-04-10 4:13 ` Jeff King
2013-04-10 16:37 ` Junio C Hamano
2013-04-10 17:27 ` Jeff King
2013-04-10 18:54 ` Junio C Hamano
2013-04-10 18:59 ` Jeff King
2013-04-10 19:31 ` Ramkumar Ramachandra
2013-04-10 19:33 ` Ramkumar Ramachandra
2013-04-10 19:52 ` Jeff King
2013-04-10 20:05 ` Ramkumar Ramachandra
2013-04-10 20:21 ` Jeff King
2013-04-10 20:41 ` Ramkumar Ramachandra [this message]
2013-04-10 21:02 ` Ramkumar Ramachandra
2013-04-10 21:32 ` Ramkumar Ramachandra
2013-04-10 20:21 ` Junio C Hamano
2013-04-10 19:53 ` Ramkumar Ramachandra
2013-04-10 20:05 ` Jonathan Nieder
2013-04-10 20:11 ` Jeff King
2013-04-10 21:23 ` Jonathan Nieder
2013-04-10 20:05 ` Jeff King
2013-04-10 20:19 ` Ramkumar Ramachandra
2013-04-10 20:24 ` Jeff King
2013-04-10 20:55 ` Ramkumar Ramachandra
2013-04-10 21:04 ` Jeff King
2013-04-10 21:11 ` Ramkumar Ramachandra
2013-04-10 21:18 ` Jonathan Nieder
2013-04-10 21:23 ` Ramkumar Ramachandra
2013-04-10 21:29 ` Jonathan Nieder
2013-04-10 21:42 ` Ramkumar Ramachandra
2013-04-10 21:56 ` Jeff King
2013-04-10 22:06 ` Ramkumar Ramachandra
2013-04-10 22:16 ` Jeff King
2013-04-10 22:11 ` Ramkumar Ramachandra
2013-04-10 22:23 ` Jeff King
2013-04-10 22:31 ` Ramkumar Ramachandra
2013-04-11 7:38 ` Ramkumar Ramachandra
2013-04-11 7:45 ` Ramkumar Ramachandra
2013-04-11 21:40 ` Junio C Hamano
2013-04-13 5:07 ` Ramkumar Ramachandra
2013-04-10 20:27 ` Junio C Hamano
2013-04-10 21:15 ` Ramkumar Ramachandra
2013-04-12 22:14 ` Junio C Hamano
2013-04-10 3:50 ` Jeff King
2013-04-10 13:22 ` Ramkumar Ramachandra
2013-04-10 15:56 ` Jeff King
2013-04-10 16:38 ` Junio C Hamano
2013-04-10 17:29 ` Jeff King
2013-04-10 13:19 ` Ramkumar Ramachandra
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=CALkWK0nfJezWbd3+VfA+DMqUNbekSJJJ539AmhQT37kkap_qeg@mail.gmail.com \
--to=artagnon@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=pclouds@gmail.com \
--cc=peff@peff.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).