From: Kevin Ballard Date: Tue, 29 Jul 2008 22:32:51 GMT Subject: Re: What is 'git BRANCH'? Message-ID: In-Reply-To: <7vej5cba6z.fsf@gitster.siamese.dyndns.org> On Jul 29, 2008, at 3:24 PM, Junio C Hamano wrote: > Jurko Gospodnetić 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