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

Re: [PATCH] Add documentation on how to integrate commands.

From
PWPete Wyckoff <pw@padd.com>
Date
Nov 24, 2012, 15:11 UTC
Message-ID
<20121124151127.GA24459@padd.com>
In-Reply-To
<20121124122333.BAD7B4065F@snark.thyrsus.com>
esr@thyrsus.com wrote on Sat, 24 Nov 2012 07:23 -0500:
Show 11 quoted lines
> +== Integrating a command ==
> +
> +Here are the things you need to do when you want to merge a new 
> +subcommand into the git tree.
> +
> +1. Append your command name to one of the variables BUILTIN_OBJS,
> +EXTRA_PROGRAMS, SCRIPT_SH, SCRIPT_PERL or SCRIPT_PYTHON.
> +
> +2. Drop its test in the t directory.
> +
> +That's all there is to it.

Nice start. A few other details; I recently did this for git-p4 (python).

.gitignore: ignore the auto-generated script, e.g. when git-foo.py is built into git-foo.

INSTALL: note language requirements if odd (see python section)
command-list.txt: categorization of commands for git(1) etc.
RelNotes: Junio generally does this.

Also please read Documentation/technical/api-builtin.txt to see how to add a built-in command. It also has comments that are identical for both built-in and stand-alone command.  Could be that your text would better go near or with that one, as perhaps api-command.txt.

		-- Pete
Previous: Eric S. RaymondNext: Eric S. Raymond
Message 2 of 8 in “Add documentation on how to integrate commands.”
  1. Add documentation on how to integrate commands.Eric S. Raymond, Nov 24, 2012
  2. Pete WyckoffNov 24, 2012
  3. Eric S. RaymondNov 24, 2012
  4. Eric S. RaymondNov 25, 2012
  5. Michael HaggertyNov 25, 2012
  6. Eric S. RaymondNov 25, 2012
  7. Junio C HamanoNov 26, 2012
  8. Eric S. RaymondNov 26, 2012

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.