From: Jeff King <peff@peff.net>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Git List <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 3/3] remote: introduce and fill branch->pushremote
Date: Mon, 13 Jan 2014 13:59:47 -0500 [thread overview]
Message-ID: <20140113185946.GA30279@sigill.intra.peff.net> (raw)
In-Reply-To: <CALkWK0ncSLza3Q0PSZ0oTZqB2YxjgGSqA7QYxk2+rN_77BKZMA@mail.gmail.com>
On Mon, Jan 13, 2014 at 04:52:52PM +0530, Ramkumar Ramachandra wrote:
> Not sure I understand what the problem is. Let's say we have two
> branches: "master", and "side" with remote.pushdefault = ram,
> branch.*.remote = origin, and branch.side.pushremote = peff. Now, when
> I query master's pushremote, I get "ram" and when I query side's
> pushremote, I get "peff"; all the logic for falling-back from
> branch.*.pushremote to remote.pushdefault to branch.*.remote is in
> branch_get(), so I need to do nothing extra on the caller-side. From
> the caller's perspective, why does it matter if the pushremote of a
> particular branch is due to branch.*.pushremote or remote.pushdefault?
Imagine your HEAD is at "side". What should "master@{publish}" produce?
I would argue "ram/master". Where does "ram" come from in your code?
It does not matter for actually pushing, because to do a non-default
push, you must always specify a remote. But "@{publish}" will ask the
question "even if I am on 'side' now, what would happen if I were to
default-push on 'master'?".
-Peff
next prev parent reply other threads:[~2014-01-13 19:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-12 17:11 [PATCH 0/3] Minor preparation for @{publish} Ramkumar Ramachandra
2014-01-12 17:11 ` [PATCH 1/3] t1507 (rev-parse-upstream): fix typo in test title Ramkumar Ramachandra
2014-01-12 17:11 ` [PATCH 2/3] interpret_branch_name: factor out upstream handling Ramkumar Ramachandra
2014-01-12 17:11 ` [PATCH 3/3] remote: introduce and fill branch->pushremote Ramkumar Ramachandra
2014-01-13 8:34 ` Jeff King
2014-01-13 11:22 ` Ramkumar Ramachandra
2014-01-13 18:59 ` Jeff King [this message]
2014-01-13 20:15 ` Junio C Hamano
2014-01-13 20:27 ` Jeff King
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=20140113185946.GA30279@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=artagnon@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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).