diff: allow lowercase letter to specify what change class to exclude
[gitweb.git] / Documentation / technical / api-builtin.txt
index 52cdb4c5201b7971ba908c35722e4914f408fbec..4a4228b896df1c06b565f330b6d7eb9d2cd9b10c 100644 (file)
@@ -4,8 +4,8 @@ builtin API
 Adding a new built-in
 ---------------------
 
-There are 4 things to do to add a bulit-in command implementation to
-git:
+There are 4 things to do to add a built-in command implementation to
+Git:
 
 . Define the implementation of the built-in command `foo` with
   signature:
@@ -18,12 +18,12 @@ git:
   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:
 
 `RUN_SETUP`::
 
-       Make sure there is a git directory to work on, and if there is a
+       Make sure there is a Git directory to work on, and if there is a
        work tree, chdir to the top of it if the command was invoked
        in a subdirectory.  If there is no work tree, no chdir() is
        done.
@@ -33,6 +33,12 @@ git:
        If the standard output is connected to a tty, spawn a pager and
        feed our output to it.
 
+`NEED_WORK_TREE`::
+
+       Make sure there is a work tree, i.e. the command cannot act
+       on bare repositories.
+       This only makes 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:
@@ -41,8 +47,9 @@ 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`.
+
+. Add an entry for `/git-foo` to `.gitignore`.
 
 
 How a built-in is called