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
JFJ. Bruce Fields <bfields@fieldses.org>
Date
Dec 7, 2006, 21:40 UTC
Message-ID
<20061207214053.GC31035@fieldses.org>
In-Reply-To
<7v64cns8nf.fsf@assigned-by-dhcp.cox.net>
On Thu, Dec 07, 2006 at 01:23:00PM -0800, Junio C Hamano wrote:
Show 23 quoted lines
> Under my suggestion, the new git-checkout -b (and git-branch)
> would:
> 
>  (0) proceed if there is an explicit branch point specified on
>      the command like, just like now;
> 
>  (1) allow omission of branch-point if the current branch has
>      allowbranchbydefault configuration set as in above.  A new
>      branch is created forking off of the current HEAD;
> 
>  (2) allow omission of branch-point if no branch has such
>      configuration; in other words, existing repositories that
>      do not have the allowbranchbydefault configuration anywhere
>      are not affected.  A new branch is created forking off of
>      the current HEAD;
> 
>  (3) otherwise, it barfs if you do not give an explicit
>      branch-point.
> 
> and a newly created repository that is newbie friendly has one
> such configuration automatically set for 'master' (if created
> with git-init) or whatever the primary branch is (if created
> with git-clone).

That makes the default behavior more complicated to explain. Is there really sufficient evidence that this a serious problem?

Previous: Junio C HamanoNext: Shawn Pearce
Message 5 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.