git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Ramkumar Ramachandra <artagnon@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 6/6] push: honor branch.*.push
Date: Mon, 24 Jun 2013 21:39:46 +0530	[thread overview]
Message-ID: <CALkWK0=a40hACGYApN7odrTytDmoRG_00_Q=EuaHuQ_=h8LBkg@mail.gmail.com> (raw)
In-Reply-To: <7vy59zbjns.fsf@alter.siamese.dyndns.org>

Junio C Hamano wrote:
> If the user said "git push" without an explicit request to push to
> "ram", and if branch.master.pushremote was not set to "ram", and
> still the command "git push" pushed the branch to "ram", then I
> would understand what you are worried about, but otherwise I do not
> see how what you are saying makes sense.

We currently have no system to differentiate between those two cases.

> A safety valve is different from a straight-jacket.  If you are
> working largely with a central repository and have push.default set
> to upstream, are you now disallowed to push out things to other
> places to ask help from your colleague to check your wip?  Why?

I've been harping about how this safety valve is poorly done, and I'm
the first person interested in loosening it.  But I do not think this
is the way to do it: drop in branch.<name>.push magic, and make
upstream suddenly work with triangular workflows?

> Or are you saying that with push.default set to upstream, only these
> two forms should be allowed?
>
>     $ git push ;# no destination, no refspec
>     $ git push there ref:spec ;# both explicitly specified

No, no.  What I meant is:

  From the documentation of push.default, I _expect_ upstream to kick
  in only in the first case.  In the second case, I _know_ that my
  push.default is inconsequential.

With branch.<name>.push magic, you've sneaked in a push refspec under
the carpet, and the first form suddenly doesn't care about
push.default anymore.  remote.<name>.push is also an under-the-carpet
implementation that I don't like: it's done in push_with_options()
which can completely bypass setup_default_push_refspecs(), shooting
the user in the face.

I want properly defined precedence and well-defined overall behavior.
Not sneaky stuff.  I don't have an answer, but will start a discussion
with some code soon.  In the meantime, since we've already figured out
this series, merge it without 6/6.

Thanks.

  reply	other threads:[~2013-06-24 16:10 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-24  4:33 [PATCH 0/6] Reroll of rr/triangular-push-fix Junio C Hamano
2013-06-24  4:33 ` [PATCH 1/6] t/t5528-push-default: remove redundant test_config lines Junio C Hamano
2013-06-24  4:33 ` [PATCH 2/6] config doc: rewrite push.default section Junio C Hamano
2013-06-24  4:33 ` [PATCH 3/6] push: change `simple` to accommodate triangular workflows Junio C Hamano
2013-06-24  6:58   ` Johan Herland
2013-06-24  7:43     ` Junio C Hamano
2013-06-24  7:46     ` Ramkumar Ramachandra
2013-06-24  8:48       ` Johan Herland
2013-06-24 14:13         ` Ramkumar Ramachandra
2013-06-24  7:59     ` Junio C Hamano
2013-06-24  8:48       ` Johan Herland
2013-06-24  4:33 ` [PATCH 4/6] t/t5528-push-default: generalize test_push_* Junio C Hamano
2013-06-24  6:58   ` Johan Herland
2013-06-24  7:28     ` Junio C Hamano
2013-06-24  8:33       ` Johan Herland
2013-06-24  8:44         ` Eric Sunshine
2013-06-24  9:45           ` Johan Herland
2013-06-24 17:21       ` Junio C Hamano
2013-06-24  4:33 ` [PATCH 5/6] t/t5528-push-default: test pushdefault workflows Junio C Hamano
2013-06-24  4:33 ` [PATCH 6/6] push: honor branch.*.push Junio C Hamano
2013-06-24  6:58   ` Johan Herland
2013-06-24  7:47     ` Junio C Hamano
2013-06-24  7:58   ` Ramkumar Ramachandra
2013-06-24  8:17     ` Junio C Hamano
2013-06-24 14:19       ` Ramkumar Ramachandra
2013-06-24 15:23         ` Johan Herland
2013-06-24 16:08           ` Junio C Hamano
2013-06-24 15:41         ` Junio C Hamano
2013-06-24 16:09           ` Ramkumar Ramachandra [this message]
2013-06-24 16:53             ` Junio C Hamano
2013-06-24 17:13               ` Ramkumar Ramachandra
2013-06-24 18:19                 ` Junio C Hamano
2013-06-24 18:23                   ` Ramkumar Ramachandra
2013-06-24  7:21 ` [PATCH 0/6] Reroll of rr/triangular-push-fix Ramkumar Ramachandra
2013-06-24  8:12   ` Junio C Hamano
2013-06-24 13:51     ` 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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALkWK0=a40hACGYApN7odrTytDmoRG_00_Q=EuaHuQ_=h8LBkg@mail.gmail.com' \
    --to=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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).