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

Re: [PATCH] Clarify the git-branch documentation of default start-point

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Jun 18, 2009, 07:57 UTC
Message-ID
<4A39F355.8020200@drmicha.warpmail.net>
In-Reply-To
<1245305061.24201.12.camel@localhost.localdomain>
Martin Nordholts venit, vidit, dixit 18.06.2009 08:04:
Show 26 quoted lines
> On Wed, 2009-06-17 at 22:48 -0700, Junio C Hamano wrote:
>> Martin Nordholts <enselic@gmail.com> writes:
>>
>>> -	is omitted, the current branch is assumed.
>>> +	is omitted, the current branch is assumed.  Note that checking
>>> +	out a remote branch does not make it the current branch.  If a
>>> +	remote branch is desired as start-point it must be an explicity
>>> +	specified.
>>
>> [...] "it" in the second new sentence is unclear.
>>
>> You probably wanted to answer "If I wanted to have _my own 'next' branch_
>> that tracks 'next' from the remote, what should I do?"
> 
> What I am trying to clarify is that a remote branch will never be the
> default for the start-point argument to git-branch, so if someone wants
> a remote branch as start-point, then the branch must be explicitly
> specified.
> 
> For this, the first sentence might actually be enough. If a remote
> branch never is the current branch, and if start-point defaults to the
> current branch, then the start-point can never default to a remote
> branch.
> 
> Should we just stick to the first sentence then perhaps?
> 

I think your usage of "start-point" is a bit unfortunate. What's a start-point? It's the commit where a branch forks off, or more precisely: the commit which the new branch's head is set to initially.

So, the start-point is never a branch! Or else it would be a "moving target".

If you specify the start-point using a branch name it's really the branch's current head which is used as the start-point.

BUT: If you specify the start-point using a branch name the DWIMery can
kick in and figure out a good default for the upstream branch (see --track).
Michael
Previous: Martin Nordholts
Message 6 of 6 in “Clarify the git-branch documentation of default start-point”
  1. Clarify the git-branch documentation of default start-pointMartin Nordholts, Jun 18, 2009
  2. Junio C HamanoJun 18, 2009
  3. Martin NordholtsJun 18, 2009
  4. Junio C HamanoJun 18, 2009
  5. Martin NordholtsJun 18, 2009
  6. Michael J GruberJun 18, 2009

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.