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

Re: What is 'git BRANCH'?

From
Jeff King <peff@peff.net>
Date
Jul 30, 2008, 05:14 UTC
Message-ID
<20080730051453.GB4034@sigill.intra.peff.net>
In-Reply-To
<bd6139dc0807291549y66c56fbah928a854f37573680@mail.gmail.com>
On Wed, Jul 30, 2008 at 12:49:00AM +0200, Sverre Rabbelier wrote:
> Why does handle_internal_command not complain after the "	for (i = 0;
> i < ARRAY_SIZE(commands); i++) {" that no matching commands were
> found? Is that not an implicit assertion that would do well with being
> asserted here?

Because it is called from two places. In one, we _know_ that this must be internal, so we die right after. In the other, we try internal, then external, then alias. So we don't want to die. Grep for handle_internal_cmmand in git.c.

-Peff
Previous: Sverre RabbelierNext: Eric Raible
Message 7 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.