Re: [PATCH 6/6] push: honor branch.*.push
- From
Ramkumar Ramachandra <artagnon@gmail.com>
- Date
- Jun 24, 2013, 07:58 UTC
- Message-ID
- <CALkWK0=aDkCMB3ROSuH1crTmQKjCFyCmvJfvOTiQnBo4+NckBA@mail.gmail.com>
- In-Reply-To
- <1372048388-16742-7-git-send-email-gitster@pobox.com>
Junio C Hamano wrote:
Show 11 quoted lines
> @@ -194,7 +203,14 @@ static int is_workflow_triagular(struct remote *remote)
> static void setup_default_push_refspecs(struct remote *remote)
> {
> struct branch *branch = branch_get(NULL);
> - int triangular = is_workflow_triagular(remote);
> + int triangular;
> +
> + if (branch->push_name) {
> + setup_per_branch_push(branch);
> + return;
> + }The most obvious question comes first: what result can I expect when this interacts with remote.<name>.push?
Why did you design this feature like this? Will the user _not_ want refspec mapping except when pushing out the current branch with a plain "git push"?
Also, you managed to throw out all safety out the window. What happens when the user does:
# on branch master, derived from origin $ git push ram
And branch.master.push is set to next? Will you let her shoot herself in the foot like this?