Anonymous committed 82936f2

api-builtin.txt: update and fix typo

Mention NEED_WORK_TREE flag and command-list.txt.
Fix "bulit-in" typo and AsciiDoc-formatting of a paragraph.

Signed-off-by: Stephan Beyer <>
Signed-off-by: Junio C Hamano <>

Comments (0)

Files changed (1)


 Adding a new built-in
-There are 4 things to do to add a bulit-in command implementation to
+There are 4 things to do to add a built-in command implementation to
 . Define the implementation of the built-in command `foo` with
   defined in `git.c`.  The entry should look like:
 	{ "foo", cmd_foo, <options> },
-  where options is the bitwise-or of:
+where options is the bitwise-or of:
 	If the standard output is connected to a tty, spawn a pager and
 	feed our output to it.
+	Make sure there is a work tree, i.e. the command cannot act
+	on bare repositories.
+	This makes only sense when `RUN_SETUP` is also set.
 . Add `builtin-foo.o` to `BUILTIN_OBJS` in `Makefile`.
 Additionally, if `foo` is a new command, there are 3 more things to do:
 . Write documentation in `Documentation/git-foo.txt`.
-. Add an entry for `git-foo` to the list at the end of
-  `Documentation/cmd-list.perl`.
+. Add an entry for `git-foo` to `command-list.txt`.
 How a built-in is called