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

Re: What is 'git BRANCH'?

From
Kevin Ballard <kevin@sb.org>
Date
Jul 29, 2008, 22:32 UTC
Message-ID
<DEBF93FC-BA8D-4513-B4EE-A8648DA1D591@sb.org>
In-Reply-To
<7vej5cba6z.fsf@gitster.siamese.dyndns.org>
On Jul 29, 2008, at 3:24 PM, Junio C Hamano wrote:
Show 14 quoted lines
> Jurko Gospodnetić <jurko.gospodnetic@docte.hr> writes:
>
>>  Hi.
>>
>>  I typed in "git BRANCH" by accident and got the error message:
>> "fatal: cannot handle BRANCH internally".
>>
>>  What does that mean?
>>
>>  It is different from the usual "git: 'yada-yada' is not a
>> git-command. See 'git --help'." message you get when you type in an
>> incorrect command name.
>
> Just a guess; your git is installed on a case-challenged filesystem?
 From what I can tell, this happens when you execute one of the git-*  
builtin binaries using a name that doesn't actually match the binary,  
case-sensitively. When you type `git BRANCH` on OS X, git matches that  
against the git-branch binary and executes it, but argv[0] contains  
"git-BRANCH". When this is compared by the git-branch binary to the  
list of internal commands, it comes up empty, and the fallback code  
(to die with "fatal: cannot handle BRANCH internally") gets executed  
instead.

In other words, this is identical to running `/usr/local/libexec/git- core/git-BRANCH` or to doing something like `exec -a git-BRANCH /usr/ local/libexec/git-core/git-branch` (this example should work on any filesystem).

-Kevin Ballard
-- 
Kevin Ballard
http://kevin.sb.org
kevin@sb.org
http://www.tildesoft.com
Previous: Junio C HamanoNext: Jurko Gospodnetić
Message 3 of 8 in “What is 'git BRANCH'?”
  1. Jurko GospodnetićJul 29, 2008
  2. Junio C HamanoJul 29, 2008
  3. Kevin BallardJul 29, 2008
  4. Jurko GospodnetićJul 29, 2008
  5. Junio C HamanoJul 29, 2008
  6. Sverre RabbelierJul 29, 2008
  7. Jeff KingJul 30, 2008
  8. Eric RaibleJul 29, 2008

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.