. Add the external declaration for the function to `builtin.h`.
-. Add the command to `commands[]` table in `handle_internal_command()`,
+. Add the command to `commands[]` table in `handle_builtin()`,
defined in `git.c`. The entry should look like:
{ "foo", cmd_foo, <options> },
return 0;
}
-static void handle_internal_command(int argc, const char **argv)
+static void handle_builtin(int argc, const char **argv)
{
const char *cmd = argv[0];
static struct cmd_struct commands[] = {
int done_alias = 0;
while (1) {
- /* See if it's an internal command */
- handle_internal_command(*argcp, *argv);
+ /* See if it's a builtin */
+ handle_builtin(*argcp, *argv);
/* .. then try the external ones */
execv_dashed_external(*argv);
* - cannot execute it externally (since it would just do
* the same thing over again)
*
- * So we just directly call the internal command handler, and
- * die if that one cannot handle it.
+ * So we just directly call the builtin handler, and die if
+ * that one cannot handle it.
*/
if (starts_with(cmd, "git-")) {
cmd += 4;
argv[0] = cmd;
- handle_internal_command(argc, argv);
- die("cannot handle %s internally", cmd);
+ handle_builtin(argc, argv);
+ die("cannot handle %s as a builtin", cmd);
}
/* Look for flags.. */