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

Re: [PATCH 1/2] Allow users to require source branch on git-checkout -b.

From
Shawn Pearce <spearce@spearce.org>
Date
Dec 7, 2006, 19:57 UTC
Message-ID
<20061207195715.GG12143@spearce.org>
In-Reply-To
<7vlkljsd1k.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> wrote:
Show 8 quoted lines
> "Shawn O. Pearce" <spearce@spearce.org> writes:
> > This introduces a new config option: checkout.requireSourceBranch,
> 
> You could turn it around and make it a per-branch configuration,
> like:
> 
> 	[branch "main"]
>         	allowbranchbydefault = true

Are you suggesting that we change "git-checkout -b" to by default require the source branch, but the user can restore the original behavior by setting the above per-branch configuration option?

I'm OK with that version too. Most of these users want to be required to enter the source branch, and their topic branches (which are always their current branches btw) are so transient they won't bother with a per-branch setting. So they get what they want: the tool reminding them to select their source revision.

Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 12 in “Allow users to require source branch on git-checkout -b.”
  1. 1/2 Allow users to require source branch on git-checkout -b.Shawn O. Pearce, Dec 7, 2006
  2. Junio C HamanoDec 7, 2006
  3. Shawn PearceDec 7, 2006
  4. Junio C HamanoDec 7, 2006
  5. J. Bruce FieldsDec 7, 2006
  6. Shawn PearceDec 7, 2006
  7. J. Bruce FieldsDec 8, 2006
  8. Shawn PearceDec 8, 2006
  9. J. Bruce FieldsDec 8, 2006
  10. Shawn PearceDec 8, 2006
  11. Junio C HamanoDec 8, 2006
  12. J. Bruce FieldsDec 8, 2006

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.