Re: [PATCH 3/6] push: change `simple` to accommodate triangular workflows

2013-06-24 Thread Johan Herland
On Mon, Jun 24, 2013 at 6:33 AM, Junio C Hamano gits...@pobox.com wrote: From: Ramkumar Ramachandra artag...@gmail.com When remote.pushdefault or branch.name.pushremote is set (a triangular workflow feature), master@{u} != origin, and push.default is set to `upstream` or `simple`: $ git

Re: [PATCH 3/6] push: change `simple` to accommodate triangular workflows

2013-06-24 Thread Junio C Hamano
Johan Herland jo...@herland.net writes: +static void setup_push_current(struct remote *remote, struct branch *branch) +{ + if (!branch) + die(_(message_detached_head_die), remote-name); + add_refspec(branch-name); Here (and above) we add a refspec to tell Git

Re: [PATCH 3/6] push: change `simple` to accommodate triangular workflows

2013-06-24 Thread Ramkumar Ramachandra
Johan Herland wrote: An earlier round of this change by mistake broke the safety for simple mode we have had since day 1 of that mode to make sure that the branch in the repository we update is set to be the one we fetch and integrate with, but it has been fixed. Shouldn't there be an

Re: [PATCH 3/6] push: change `simple` to accommodate triangular workflows

2013-06-24 Thread Junio C Hamano
Johan Herland jo...@herland.net writes: An earlier round of this change by mistake broke the safety for simple mode we have had since day 1 of that mode to make sure that the branch in the repository we update is set to be the one we fetch and integrate with, but it has been fixed.

Re: [PATCH 3/6] push: change `simple` to accommodate triangular workflows

2013-06-24 Thread Johan Herland
On Mon, Jun 24, 2013 at 9:59 AM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: An earlier round of this change by mistake broke the safety for simple mode we have had since day 1 of that mode to make sure that the branch in the repository we update is set to

Re: [PATCH 3/6] push: change `simple` to accommodate triangular workflows

2013-06-24 Thread Johan Herland
On Mon, Jun 24, 2013 at 9:46 AM, Ramkumar Ramachandra artag...@gmail.com wrote: Johan Herland wrote: +static void setup_push_current(struct remote *remote, struct branch *branch) +{ + if (!branch) + die(_(message_detached_head_die), remote-name); +

Re: [PATCH 3/6] push: change `simple` to accommodate triangular workflows

2013-06-24 Thread Ramkumar Ramachandra
Johan Herland wrote: But then, does it make sense to say that we will only ever have exactly _one_ push refspec in the current context, and we should therefore replace the static const char **refspec; string array with a single static const char *refspec; string? That would make it obvious

Re: [PATCH 3/6] push: change `simple` to accommodate triangular workflows

2013-06-20 Thread Ramkumar Ramachandra
Junio C Hamano wrote: Decouple `simple` from `upstream` completely, and change it to mean `current` with a safety feature: a `push` and `pull` should not be asymmetrical in the special case of central workflows. Double negation confused my parser. 'push' and 'pull' should be kept

Re: [PATCH 3/6] push: change `simple` to accommodate triangular workflows

2013-06-20 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com writes: Junio C Hamano wrote: Decouple `simple` from `upstream` completely, and change it to mean `current` with a safety feature: a `push` and `pull` should not be asymmetrical in the special case of central workflows. Double negation confused my

Re: [PATCH 3/6] push: change `simple` to accommodate triangular workflows

2013-06-20 Thread Philip Oakley
From: Junio C Hamano gits...@pobox.com Sent: Thursday, June 20, 2013 8:23 PM Ramkumar Ramachandra artag...@gmail.com writes: Junio C Hamano wrote: Decouple `simple` from `upstream` completely, and change it to mean `current` with a safety feature: a `push` and `pull` should not be

Re: [PATCH 3/6] push: change `simple` to accommodate triangular workflows

2013-06-20 Thread Junio C Hamano
Philip Oakley philipoak...@iee.org writes: From: Junio C Hamano gits...@pobox.com Sent: Thursday, June 20, 2013 8:23 PM Ramkumar Ramachandra artag...@gmail.com writes: Junio C Hamano wrote: Double negation confused my parser. 'push' and 'pull' should be kept symmetrical in central

Re: [PATCH 3/6] push: change `simple` to accommodate triangular workflows

2013-06-20 Thread Ramkumar Ramachandra
Junio C Hamano wrote: They're not the same thing. It is very much intentional and intended: the safety net is not to ensure that the push and pull are symmetrical (i.e. among other things, error out if branch.$branch.merge is unset), but rather ensure that the push and pull are never

Re: [PATCH 3/6] push: change `simple` to accommodate triangular workflows

2013-06-20 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Junio C Hamano gits...@pobox.com writes: Without any configuration the current branch is pushed out, which loosens the safety we implemented in the current 'safer upstream'. I am not convinced this is a good change. I am not convinced this is a bad

Re: [PATCH 3/6] push: change `simple` to accommodate triangular workflows

2013-06-20 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com writes: Junio C Hamano wrote: They're not the same thing. It is very much intentional and intended: the safety net is not to ensure that the push and pull are symmetrical (i.e. among other things, error out if branch.$branch.merge is unset), but

Re: [PATCH 3/6] push: change `simple` to accommodate triangular workflows

2013-06-20 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Like you said, I do not want to contaminate this series with such an unrelated change. Worse, you are trying to break a sane default by replacing it with anything goes. We already have a sane default, which is to error out. We do not need your

Re: [PATCH 3/6] push: change `simple` to accommodate triangular workflows

2013-06-19 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com writes: When remote.pushdefault or branch.name.pushremote is set (a triangular workflow feature), master@{u} != origin, and push.default is set to `upstream` or `simple`: $ git push fatal: You are pushing to remote 'origin', which is not the

Re: [PATCH 3/6] push: change `simple` to accommodate triangular workflows

2013-06-19 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Without any configuration the current branch is pushed out, which loosens the safety we implemented in the current 'safer upstream'. I am not convinced this is a good change. I am not convinced this is a bad change, either, yet, but this loosening