git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: branch.<name>.pushremote not working with push.default simple or upstream

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Jun 7, 2013, 16:51 UTC
Message-ID
<CALkWK0m0QDGVUmHkmzC7G6it9fJafQCh8+423-NOyMwq9yts1Q@mail.gmail.com>
In-Reply-To
<7v8v2lvs5s.fsf@alter.siamese.dyndns.org>
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 push\n"
-		      "to update which remote branch."),
-		    remote->name, branch->name);
 	if (simple && strcmp(branch->refname, branch->merge[0]->src))
 		die_push_simple(branch, remote);
Previous: Ramkumar RamachandraNext: Junio C Hamano
Message 8 of 9 in “branch.<name>.pushremote not working with push.default simple or upstream”
  1. Leandro LucarellaJun 7, 2013
  2. Ramkumar RamachandraJun 7, 2013
  3. Junio C HamanoJun 7, 2013
  4. Leandro LucarellaJun 7, 2013
  5. Ramkumar RamachandraJun 7, 2013
  6. Leandro LucarellaJun 7, 2013
  7. Ramkumar RamachandraJun 7, 2013
  8. Ramkumar RamachandraJun 7, 2013
  9. Junio C HamanoJun 7, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.