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 8, 2006, 15:39 UTC
Message-ID
<20061208153931.GA14378@fieldses.org>
In-Reply-To
<7vac1yoq3r.fsf@assigned-by-dhcp.cox.net>
On Thu, Dec 07, 2006 at 10:31:52PM -0800, Junio C Hamano wrote:
Show 14 quoted lines
> Shawn Pearce <spearce@spearce.org> writes:
> 
> >> But my main complaint is just that I wouldn't want to see the behavior
> >> of defaulting to HEAD--behavior which is simple, easy to explain, and
> >> shared by most other git commands--by something significantly more
> >> complicated.  That's more a complaint about Junio's suggestion than
> >> yours, though.
> >
> > True, defaulting to HEAD is something that is done almost everywhere.
> > Changing it for `git checkout -b` may surprise a lot of people,
> > almost as much as --index vs. --cached.
> 
> I did not mean to change the default to something other than
> HEAD depending on the configuration.

Right, I understand that behavior in existing repositories is not changed...

Show 7 quoted lines
> > (3) otherwise, it barfs if you do not give an explicit
> >     branch-point.
> 
> ... but a newly created repositories would have an
> allowbranchbydefault entry on "master" (and only on "master"),
> which means new people would be prevented from making mistakes
> when on a non-master branch 'foo':

... my concern is the default behavior on newly created repositories, which (unless I've misunderstood) would become more complicated.

> But I do not deeply care about this.
OK.  Me neither, to be honest.
Previous: Junio C Hamano
Message 12 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.