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

Re: [PATCH v2 1/4] Consistently use the term "builtin" instead of "internal command"

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Jan 2, 2014, 20:31 UTC
Message-ID
<20140102203132.GQ20443@google.com>
In-Reply-To
<52C590B0.1020702@gmail.com>
Hi,
Sebastian Schuberth wrote:
[...]
Show 8 quoted lines
> --- a/Documentation/technical/api-builtin.txt
> +++ b/Documentation/technical/api-builtin.txt
> @@ -14,7 +14,7 @@ Git:
>  
>  . 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()`,
Makes sense.  Using consistent jargon makes for easier reading.
[...]
> +++ b/git.c
[...]
> @@ -563,14 +563,14 @@ int main(int argc, char **av)
[...]
Show 7 quoted lines
>  	if (starts_with(cmd, "git-")) {
>  		cmd += 4;
>  		argv[0] = cmd;
> -		handle_internal_command(argc, argv);
> +		handle_builtin(argc, argv);
> -		die("cannot handle %s internally", cmd);
> +		die("cannot handle %s as a builtin", cmd);
I think this makes the user-visible message less clear.

Before when the user had a stale git-whatever link lingering in gitexecdir, git would say

	fatal: cannot handle whatever internally

which tells me git was asked to handle the whatever command internally and was unable to. Afterward, it becomes

	fatal: cannot handle whatever as a builtin

which requires that I learn the jargon use of "builtin" as a noun. busybox's analogous message is "applet not found". It's less likely to come up when using git because it requires having a stray link to "git". A message like

	$ git whatever
	fatal: whatever: no such built-in command

would just leave me wondering "I never claimed it was built-in; what's going on?" I think it would be simplest to keep it as

	$ git whatever
	fatal: cannot handle "whatever" internally
which at least makes it clear that this is a low-level error.
The rest of the patch looks good.

Thanks, Jonathan

Previous: Sebastian SchuberthNext: Sebastian Schuberth
Message 3 of 16 in “[PATCH v2 0/4]”
  1. 0/4 Sebastian Schuberth, Jan 2, 2014
  2. 1/4 Consistently use the term "builtin" instead of "internal command"Sebastian Schuberth, Jan 2, 2014
  3. Jonathan NiederJan 2, 2014
  4. Sebastian SchuberthJan 2, 2014
  5. Sebastian SchuberthJan 22, 2014
  6. 2/4 Call load_command_list() only when it is neededSebastian Schuberth, Jan 2, 2014
  7. 3/4 Speed up is_git_command() by checking early for internal commandsSebastian Schuberth, Jan 2, 2014
  8. Junio C HamanoJan 2, 2014
  9. Jeff KingJan 3, 2014
  10. Junio C HamanoJan 3, 2014
  11. Kent R. SpillnerJan 3, 2014
  12. Sebastian SchuberthJan 5, 2014
  13. Sebastian SchuberthJan 22, 2014
  14. 4/4 Move builtin-related implementations to a new builtin.c fileSebastian Schuberth, Jan 2, 2014
  15. Junio C HamanoJan 2, 2014
  16. Sebastian SchuberthJan 2, 2014

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.