Merge branch 'ph/builtin-srcs-are-in-subdir-these-days' into maint

* ph/builtin-srcs-are-in-subdir-these-days:
  fix "builtin-*" references to be "builtin/*"
This commit is contained in:
Junio C Hamano 2013-07-21 22:51:29 -07:00
Родитель 8c091d918d 09b7e2204a
Коммит 80f074396d
9 изменённых файлов: 20 добавлений и 21 удалений

Просмотреть файл

@ -115,9 +115,9 @@ Examples
in the "release" branch, along with the list of paths in the "release" branch, along with the list of paths
each commit modifies. each commit modifies.
`git log --follow builtin-rev-list.c`:: `git log --follow builtin/rev-list.c`::
Shows the commits that changed builtin-rev-list.c, including Shows the commits that changed builtin/rev-list.c, including
those commits that occurred before the file was given its those commits that occurred before the file was given its
present name. present name.

Просмотреть файл

@ -39,7 +39,7 @@ where options is the bitwise-or of:
on bare repositories. on bare repositories.
This only makes sense when `RUN_SETUP` is also set. This only makes sense when `RUN_SETUP` is also set.
. Add `builtin-foo.o` to `BUILTIN_OBJS` in `Makefile`. . Add `builtin/foo.o` to `BUILTIN_OBJS` in `Makefile`.
Additionally, if `foo` is a new command, there are 3 more things to do: Additionally, if `foo` is a new command, there are 3 more things to do:

Просмотреть файл

@ -269,10 +269,10 @@ Examples
-------- --------
See `test-parse-options.c` and See `test-parse-options.c` and
`builtin-add.c`, `builtin/add.c`,
`builtin-clone.c`, `builtin/clone.c`,
`builtin-commit.c`, `builtin/commit.c`,
`builtin-fetch.c`, `builtin/fetch.c`,
`builtin-fsck.c`, `builtin/fsck.c`,
`builtin-rm.c` `builtin/rm.c`
for real-world examples. for real-world examples.

Просмотреть файл

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

Просмотреть файл

@ -1,6 +1,4 @@
/* /*
* builtin-help.c
*
* Builtin help command * Builtin help command
*/ */
#include "cache.h" #include "cache.h"

Просмотреть файл

@ -4,7 +4,7 @@
* Copyright (c) 2010 Johan Herland <johan@herland.net> * Copyright (c) 2010 Johan Herland <johan@herland.net>
* *
* Based on git-notes.sh by Johannes Schindelin, * Based on git-notes.sh by Johannes Schindelin,
* and builtin-tag.c by Kristian Høgsberg and Carlos Rica. * and builtin/tag.c by Kristian Høgsberg and Carlos Rica.
*/ */
#include "cache.h" #include "cache.h"

Просмотреть файл

@ -3,7 +3,7 @@
* *
* Copyright (c) 2008 Christian Couder <chriscool@tuxfamily.org> * Copyright (c) 2008 Christian Couder <chriscool@tuxfamily.org>
* *
* Based on builtin-tag.c by Kristian Høgsberg <krh@redhat.com> * Based on builtin/tag.c by Kristian Høgsberg <krh@redhat.com>
* and Carlos Rica <jasampler@gmail.com> that was itself based on * and Carlos Rica <jasampler@gmail.com> that was itself based on
* git-tag.sh and mktag.c by Linus Torvalds. * git-tag.sh and mktag.c by Linus Torvalds.
*/ */

Просмотреть файл

@ -1228,7 +1228,7 @@ int transport_fetch_refs(struct transport *transport, struct ref *refs)
* then local and remote refs are likely to still be equal. * then local and remote refs are likely to still be equal.
* Just feed them all to the fetch method in that case. * Just feed them all to the fetch method in that case.
* This condition shouldn't be met in a non-deepening fetch * This condition shouldn't be met in a non-deepening fetch
* (see builtin-fetch.c:quickfetch()). * (see builtin/fetch.c:quickfetch()).
*/ */
heads = xmalloc(nr_refs * sizeof(*heads)); heads = xmalloc(nr_refs * sizeof(*heads));
for (rm = refs; rm; rm = rm->next) for (rm = refs; rm; rm = rm->next)

Просмотреть файл

@ -168,7 +168,7 @@ int transport_connect(struct transport *transport, const char *name,
int transport_helper_init(struct transport *transport, const char *name); int transport_helper_init(struct transport *transport, const char *name);
int bidirectional_transfer_loop(int input, int output); int bidirectional_transfer_loop(int input, int output);
/* common methods used by transport.c and builtin-send-pack.c */ /* common methods used by transport.c and builtin/send-pack.c */
void transport_verify_remote_names(int nr_heads, const char **heads); void transport_verify_remote_names(int nr_heads, const char **heads);
void transport_update_tracking_ref(struct remote *remote, struct ref *ref, int verbose); void transport_update_tracking_ref(struct remote *remote, struct ref *ref, int verbose);