Junio C Hamano wrote:
> This shows the "triangular" support in 1.8.3 is only half-finished;
> the other half was discussed a few weeks ago ($gmane/224604)

I intentionally omitted that detail, because it is not directly
related to this bug.  We have to fix the existing simple and upstream,
whether or not we introduce branch.<name>.push.  I've personally
stopped working on branch.<name>.push, and am focusing on getting @{p}
first (you've already seen a dirty wip).  The transport code
underlying the push is dirty enough, and I'd first like to understand
it before bolting on more features.

> I think the
> natural extension of the current end-user configuration would be to
> redefine "upstream" mode to push to update the branch with the same
> name

Right, so does this work?

diff --git a/builtin/push.c b/builtin/push.c
index 2d84d10..b253a64 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -137,11 +137,6 @@ static void setup_push_upstream(struct remote
        if (branch->merge_nr != 1)
                die(_("The current branch %s has multiple upstream branches, "
                    "refusing to push."), branch->name);
-       if (strcmp(branch->remote_name, remote->name))
-               die(_("You are pushing to remote '%s', which is not the 
upstream of\n"
-                     "your current branch '%s', without telling me what to 
-                     "to update which remote branch."),
-                   remote->name, branch->name);
        if (simple && strcmp(branch->refname, branch->merge[0]->src))
                die_push_simple(branch, remote);
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to