Ramkumar Ramachandra <artagnon@xxxxxxxxx> writes: > Junio C Hamano wrote: >> @@ -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? Now you bring it up, the branch.*.push may want to be more specific (when I am on _this_ branch, do this) than remote.*.push (when I am pushing to that remote, I want this to happen in general), but this default codepath would not be exercised when you have remote.*.push, so the logic may need to be moved higher up in the foodchain. > 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? It is not shooting in the foot, if branch.master.push is explicitly set to update next. I do not see any issue in that part. But the relative strength betweenh branch.*.push and remote.*.push may need to be thought out. I haven't. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html