Skip to content

Commit 80f0743

Browse files
committed
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/*"
2 parents 8c091d9 + 09b7e22 commit 80f0743

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
@@ -115,9 +115,9 @@ Examples
115115
in the "release" branch, along with the list of paths
116116
each commit modifies.
117117

118-
`git log --follow builtin-rev-list.c`::
118+
`git log --follow builtin/rev-list.c`::
119119

120-
Shows the commits that changed builtin-rev-list.c, including
120+
Shows the commits that changed builtin/rev-list.c, including
121121
those commits that occurred before the file was given its
122122
present name.
123123

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
@@ -269,10 +269,10 @@ Examples
269269
--------
270270

271271
See `test-parse-options.c` and
272-
`builtin-add.c`,
273-
`builtin-clone.c`,
274-
`builtin-commit.c`,
275-
`builtin-fetch.c`,
276-
`builtin-fsck.c`,
277-
`builtin-rm.c`
272+
`builtin/add.c`,
273+
`builtin/clone.c`,
274+
`builtin/commit.c`,
275+
`builtin/fetch.c`,
276+
`builtin/fsck.c`,
277+
`builtin/rm.c`
278278
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
@@ -1228,7 +1228,7 @@ int transport_fetch_refs(struct transport *transport, struct ref *refs)
12281228
* then local and remote refs are likely to still be equal.
12291229
* Just feed them all to the fetch method in that case.
12301230
* This condition shouldn't be met in a non-deepening fetch
1231-
* (see builtin-fetch.c:quickfetch()).
1231+
* (see builtin/fetch.c:quickfetch()).
12321232
*/
12331233
heads = xmalloc(nr_refs * sizeof(*heads));
12341234
for (rm = refs; rm; rm = rm->next)

transport.h

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

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

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

0 commit comments

Comments
 (0)