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

Re: 'simple' push check that branch name matches does not work if push.default is unset (and hence implicitly simple)

From
Jeff King <peff@peff.net>
Date
Nov 28, 2014, 04:55 UTC
Message-ID
<20141128045518.GB19456@peff.net>
In-Reply-To
<1417108347.18654.4.camel@redhat.com>
On Thu, Nov 27, 2014 at 09:12:27AM -0800, Adam Williamson wrote:
Show 11 quoted lines
> It might also be worth improving the warn_unspecified_push_default_msg[]
> text to mention the name matching behaviour? At present it doesn't
> clearly explain this (you could argue it's *sort of* implied, but I
> doubt many people will read it that way - I didn't), you have to follow
> the chain into 'git help config' to find the description. Something
> like:
> 
>    "Since Git 2.0, Git defaults to the more conservative 'simple'\n"
>    "behavior, which only pushes the current branch to the corresponding\n"
>    "remote branch that 'git pull' uses to update the current branch, \n"
>    "if the names of those two branches match.\n"
Yeah, I agree that is more clear.

There is some other magic with "simple", too, around triangular workflows. Describing it in detail would probably be too verbose in this message, but we do refer to the description of push.default, which is probably enough. Technically this new bit you are adding here is covered there, too. But since we can improve the description by adding such a small amount of text in this case, it seems like a reasonable tradeoff.

I suppose we could also customize the message based on the triangular and non-triangular cases. I dunno.

-Peff
Previous: Adam WilliamsonNext: Junio C Hamano
Message 6 of 7 in “'simple' push check that branch name matches does not work if push.default is unset (and hence implicitly simple)”
  1. Adam WilliamsonNov 26, 2014
  2. Adam WilliamsonNov 26, 2014
  3. Jeff KingNov 27, 2014
  4. Adam WilliamsonNov 27, 2014
  5. Adam WilliamsonNov 27, 2014
  6. Jeff KingNov 28, 2014
  7. Junio C HamanoDec 1, 2014

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.