@@ -4256,15 +4256,16 @@ no longer need to call `setup_pager()` directly).
42564256Nowadays, `git log` is a builtin, which means that it is _contained_ in the
42574257command `git`. The source side of a builtin is
42584258
4259- - a function called `cmd_<bla>`, typically defined in `builtin-<bla>.c`,
4260- and declared in `builtin.h`,
4259+ - a function called `cmd_<bla>`, typically defined in `builtin/<bla.c>`
4260+ (note that older versions of Git used to have it in `builtin-<bla>.c`
4261+ instead), and declared in `builtin.h`.
42614262
42624263- an entry in the `commands[]` array in `git.c`, and
42634264
42644265- an entry in `BUILTIN_OBJECTS` in the `Makefile`.
42654266
42664267Sometimes, more than one builtin is contained in one source file. For
4267- example, `cmd_whatchanged()` and `cmd_log()` both reside in `builtin- log.c`,
4268+ example, `cmd_whatchanged()` and `cmd_log()` both reside in `builtin/ log.c`,
42684269since they share quite a bit of code. In that case, the commands which are
42694270_not_ named like the `.c` file in which they live have to be listed in
42704271`BUILT_INS` in the `Makefile`.
@@ -4287,10 +4288,10 @@ For the sake of clarity, let's stay with `git cat-file`, because it
42874288- is plumbing, and
42884289
42894290- was around even in the initial commit (it literally went only through
4290- some 20 revisions as `cat-file.c`, was renamed to `builtin- cat-file.c`
4291+ some 20 revisions as `cat-file.c`, was renamed to `builtin/ cat-file.c`
42914292 when made a builtin, and then saw less than 10 versions).
42924293
4293- So, look into `builtin- cat-file.c`, search for `cmd_cat_file()` and look what
4294+ So, look into `builtin/ cat-file.c`, search for `cmd_cat_file()` and look what
42944295it does.
42954296
42964297------------------------------------------------------------------
@@ -4366,7 +4367,7 @@ Another example: Find out what to do in order to make some script a
43664367builtin:
43674368
43684369-------------------------------------------------
4369- $ git log --no-merges --diff-filter=A builtin- *.c
4370+ $ git log --no-merges --diff-filter=A builtin/ *.c
43704371-------------------------------------------------
43714372
43724373You see, Git is actually the best tool to find out about the source of Git
0 commit comments