@matheusbsbs / matheus-bagliano / commits / 8c6cfcddce
Fork 0

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 <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Stephan Beyer committed Jun 22, 2008 at 01:54 UTC 8c6cfcddce80381a61a4cc0460ca497a271bfbff
1 file changed +10 -5
Documentation/technical/api-builtin.txt
+10 -5
@@ -4,7 +4,7 @@ builtin API
4 Adding a new built-in
5 ---------------------
6
7 -There are 4 things to do to add a bulit-in command implementation to
7 +There are 4 things to do to add a built-in command implementation to
8 git:
9
10 . Define the implementation of the built-in command `foo` with
@@ -18,8 +18,8 @@ git:
18 defined in `git.c`. The entry should look like:
19
20 { "foo", cmd_foo, <options> },
21 -
22 - where options is the bitwise-or of:
21 ++
22 +where options is the bitwise-or of:
23
24 `RUN_SETUP`::
25
@@ -33,6 +33,12 @@ git:
33 If the standard output is connected to a tty, spawn a pager and
34 feed our output to it.
35
36 +`NEED_WORK_TREE`::
37 +
38 + Make sure there is a work tree, i.e. the command cannot act
39 + on bare repositories.
40 + This makes only sense when `RUN_SETUP` is also set.
41 +
42 . Add `builtin-foo.o` to `BUILTIN_OBJS` in `Makefile`.
43
44 Additionally, if `foo` is a new command, there are 3 more things to do:
@@ -41,8 +47,7 @@ Additionally, if `foo` is a new command, there are 3 more things to do:
47
48 . Write documentation in `Documentation/git-foo.txt`.
49
44 -. Add an entry for `git-foo` to the list at the end of
45 - `Documentation/cmd-list.perl`.
50 +. Add an entry for `git-foo` to `command-list.txt`.
51
52
53 How a built-in is called