Skip to content

Commit 2ddc898

Browse files
committed
Merge branch 'ph/builtin-srcs-are-in-subdir-these-days'
* ph/builtin-srcs-are-in-subdir-these-days: fix "builtin-*" references to be "builtin/*"
2 parents 9a17e9a + 09b7e22 commit 2ddc898

File tree

9 files changed

+20
-21
lines changed

9 files changed

+20
-21
lines changed

Documentation/git-log.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ Examples
128128
in the "release" branch, along with the list of paths
129129
each commit modifies.
130130

131-
`git log --follow builtin-rev-list.c`::
131+
`git log --follow builtin/rev-list.c`::
132132

133-
Shows the commits that changed builtin-rev-list.c, including
133+
Shows the commits that changed builtin/rev-list.c, including
134134
those commits that occurred before the file was given its
135135
present name.
136136

Documentation/technical/api-builtin.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ where options is the bitwise-or of:
3939
on bare repositories.
4040
This only makes sense when `RUN_SETUP` is also set.
4141

42-
. Add `builtin-foo.o` to `BUILTIN_OBJS` in `Makefile`.
42+
. Add `builtin/foo.o` to `BUILTIN_OBJS` in `Makefile`.
4343

4444
Additionally, if `foo` is a new command, there are 3 more things to do:
4545

Documentation/technical/api-parse-options.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -275,10 +275,10 @@ Examples
275275
--------
276276

277277
See `test-parse-options.c` and
278-
`builtin-add.c`,
279-
`builtin-clone.c`,
280-
`builtin-commit.c`,
281-
`builtin-fetch.c`,
282-
`builtin-fsck.c`,
283-
`builtin-rm.c`
278+
`builtin/add.c`,
279+
`builtin/clone.c`,
280+
`builtin/commit.c`,
281+
`builtin/fetch.c`,
282+
`builtin/fsck.c`,
283+
`builtin/rm.c`
284284
for real-world examples.

Documentation/user-manual.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4256,15 +4256,16 @@ no longer need to call `setup_pager()` directly).
42564256
Nowadays, `git log` is a builtin, which means that it is _contained_ in the
42574257
command `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

42664267
Sometimes, 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`,
42684269
since 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
42944295
it does.
42954296

42964297
------------------------------------------------------------------
@@ -4366,7 +4367,7 @@ Another example: Find out what to do in order to make some script a
43664367
builtin:
43674368

43684369
-------------------------------------------------
4369-
$ git log --no-merges --diff-filter=A builtin-*.c
4370+
$ git log --no-merges --diff-filter=A builtin/*.c
43704371
-------------------------------------------------
43714372

43724373
You see, Git is actually the best tool to find out about the source of Git

builtin/help.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/*
2-
* builtin-help.c
3-
*
42
* Builtin help command
53
*/
64
#include "cache.h"

builtin/notes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Copyright (c) 2010 Johan Herland <[email protected]>
55
*
66
* Based on git-notes.sh by Johannes Schindelin,
7-
* and builtin-tag.c by Kristian Høgsberg and Carlos Rica.
7+
* and builtin/tag.c by Kristian Høgsberg and Carlos Rica.
88
*/
99

1010
#include "cache.h"

builtin/replace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2008 Christian Couder <[email protected]>
55
*
6-
* Based on builtin-tag.c by Kristian Høgsberg <[email protected]>
6+
* Based on builtin/tag.c by Kristian Høgsberg <[email protected]>
77
* and Carlos Rica <[email protected]> that was itself based on
88
* git-tag.sh and mktag.c by Linus Torvalds.
99
*/

transport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1232,7 +1232,7 @@ int transport_fetch_refs(struct transport *transport, struct ref *refs)
12321232
* then local and remote refs are likely to still be equal.
12331233
* Just feed them all to the fetch method in that case.
12341234
* This condition shouldn't be met in a non-deepening fetch
1235-
* (see builtin-fetch.c:quickfetch()).
1235+
* (see builtin/fetch.c:quickfetch()).
12361236
*/
12371237
heads = xmalloc(nr_refs * sizeof(*heads));
12381238
for (rm = refs; rm; rm = rm->next)

transport.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ int transport_connect(struct transport *transport, const char *name,
170170
int transport_helper_init(struct transport *transport, const char *name);
171171
int bidirectional_transfer_loop(int input, int output);
172172

173-
/* common methods used by transport.c and builtin-send-pack.c */
173+
/* common methods used by transport.c and builtin/send-pack.c */
174174
void transport_verify_remote_names(int nr_heads, const char **heads);
175175

176176
void transport_update_tracking_ref(struct remote *remote, struct ref *ref, int verbose);

0 commit comments

Comments
 (0)