@matheusbsbs / matheus-bagliano / commits / dbbcd44fb4
Fork 0

strvec: rename files from argv-array to strvec

This requires updating #include lines across the code-base, but that's all fairly mechanical, and was done with: git ls-files '*.c' '*.h' | xargs perl -i -pe 's/argv-array.h/strvec.h/' Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Jul 28, 2020 at 16:23 UTC dbbcd44fb47347a3fdbee88ea21805b7f4ac0b98
59 files changed +61 -61
Makefile
+1 -1
@@ -828,7 +828,6 @@ LIB_OBJS += apply.o
828 LIB_OBJS += archive-tar.o
829 LIB_OBJS += archive-zip.o
830 LIB_OBJS += archive.o
831 -LIB_OBJS += argv-array.o
831 LIB_OBJS += attr.o
832 LIB_OBJS += base85.o
833 LIB_OBJS += bisect.o
@@ -986,6 +985,7 @@ LIB_OBJS += sigchain.o
985 LIB_OBJS += split-index.o
986 LIB_OBJS += stable-qsort.o
987 LIB_OBJS += strbuf.o
988 +LIB_OBJS += strvec.o
989 LIB_OBJS += streaming.o
990 LIB_OBJS += string-list.o
991 LIB_OBJS += sub-process.o
add-patch.c
+1 -1
@@ -2,7 +2,7 @@
2 #include "add-interactive.h"
3 #include "strbuf.h"
4 #include "run-command.h"
5 -#include "argv-array.h"
5 +#include "strvec.h"
6 #include "pathspec.h"
7 #include "color.h"
8 #include "diff.h"
bisect.c
+1 -1
@@ -11,7 +11,7 @@
11 #include "log-tree.h"
12 #include "bisect.h"
13 #include "oid-array.h"
14 -#include "argv-array.h"
14 +#include "strvec.h"
15 #include "commit-slab.h"
16 #include "commit-reach.h"
17 #include "object-store.h"
builtin/add.c
+1 -1
@@ -18,7 +18,7 @@
18 #include "diffcore.h"
19 #include "revision.h"
20 #include "bulk-checkin.h"
21 -#include "argv-array.h"
21 +#include "strvec.h"
22 #include "submodule.h"
23 #include "add-interactive.h"
24
builtin/annotate.c
+1 -1
@@ -5,7 +5,7 @@
5 */
6 #include "git-compat-util.h"
7 #include "builtin.h"
8 -#include "argv-array.h"
8 +#include "strvec.h"
9
10 int cmd_annotate(int argc, const char **argv, const char *prefix)
11 {
builtin/bisect--helper.c
+1 -1
@@ -4,7 +4,7 @@
4 #include "bisect.h"
5 #include "refs.h"
6 #include "dir.h"
7 -#include "argv-array.h"
7 +#include "strvec.h"
8 #include "run-command.h"
9 #include "prompt.h"
10 #include "quote.h"
builtin/bundle.c
+1 -1
@@ -1,5 +1,5 @@
1 #include "builtin.h"
2 -#include "argv-array.h"
2 +#include "strvec.h"
3 #include "parse-options.h"
4 #include "cache.h"
5 #include "bundle.h"
builtin/describe.c
+1 -1
@@ -12,7 +12,7 @@
12 #include "revision.h"
13 #include "diff.h"
14 #include "hashmap.h"
15 -#include "argv-array.h"
15 +#include "strvec.h"
16 #include "run-command.h"
17 #include "object-store.h"
18 #include "list-objects.h"
builtin/difftool.c
+1 -1
@@ -18,7 +18,7 @@
18 #include "run-command.h"
19 #include "exec-cmd.h"
20 #include "parse-options.h"
21 -#include "argv-array.h"
21 +#include "strvec.h"
22 #include "strbuf.h"
23 #include "lockfile.h"
24 #include "object-store.h"
builtin/fetch.c
+1 -1
@@ -19,7 +19,7 @@
19 #include "submodule-config.h"
20 #include "submodule.h"
21 #include "connected.h"
22 -#include "argv-array.h"
22 +#include "strvec.h"
23 #include "utf8.h"
24 #include "packfile.h"
25 #include "list-objects-filter-options.h"
builtin/gc.c
+1 -1
@@ -18,7 +18,7 @@
18 #include "parse-options.h"
19 #include "run-command.h"
20 #include "sigchain.h"
21 -#include "argv-array.h"
21 +#include "strvec.h"
22 #include "commit.h"
23 #include "commit-graph.h"
24 #include "packfile.h"
builtin/pack-objects.c
+1 -1
@@ -27,7 +27,7 @@
27 #include "delta-islands.h"
28 #include "reachable.h"
29 #include "oid-array.h"
30 -#include "argv-array.h"
30 +#include "strvec.h"
31 #include "list.h"
32 #include "packfile.h"
33 #include "object-store.h"
builtin/rebase.c
+1 -1
@@ -8,7 +8,7 @@
8 #include "builtin.h"
9 #include "run-command.h"
10 #include "exec-cmd.h"
11 -#include "argv-array.h"
11 +#include "strvec.h"
12 #include "dir.h"
13 #include "packfile.h"
14 #include "refs.h"
builtin/receive-pack.c
+1 -1
@@ -15,7 +15,7 @@
15 #include "string-list.h"
16 #include "oid-array.h"
17 #include "connected.h"
18 -#include "argv-array.h"
18 +#include "strvec.h"
19 #include "version.h"
20 #include "tag.h"
21 #include "gpg-interface.h"
builtin/remote.c
+1 -1
@@ -10,7 +10,7 @@
10 #include "refs.h"
11 #include "refspec.h"
12 #include "object-store.h"
13 -#include "argv-array.h"
13 +#include "strvec.h"
14 #include "commit-reach.h"
15
16 static const char * const builtin_remote_usage[] = {
builtin/repack.c
+1 -1
@@ -7,7 +7,7 @@
7 #include "sigchain.h"
8 #include "strbuf.h"
9 #include "string-list.h"
10 -#include "argv-array.h"
10 +#include "strvec.h"
11 #include "midx.h"
12 #include "packfile.h"
13 #include "prune-packed.h"
builtin/show-branch.c
+1 -1
@@ -4,7 +4,7 @@
4 #include "refs.h"
5 #include "builtin.h"
6 #include "color.h"
7 -#include "argv-array.h"
7 +#include "strvec.h"
8 #include "parse-options.h"
9 #include "dir.h"
10 #include "commit-slab.h"
builtin/stash.c
+1 -1
@@ -7,7 +7,7 @@
7 #include "cache-tree.h"
8 #include "unpack-trees.h"
9 #include "merge-recursive.h"
10 -#include "argv-array.h"
10 +#include "strvec.h"
11 #include "run-command.h"
12 #include "dir.h"
13 #include "rerere.h"
builtin/update-ref.c
+1 -1
@@ -4,7 +4,7 @@
4 #include "builtin.h"
5 #include "parse-options.h"
6 #include "quote.h"
7 -#include "argv-array.h"
7 +#include "strvec.h"
8
9 static const char * const git_update_ref_usage[] = {
10 N_("git update-ref [<options>] -d <refname> [<old-val>]"),
builtin/upload-archive.c
+1 -1
@@ -7,7 +7,7 @@
7 #include "pkt-line.h"
8 #include "sideband.h"
9 #include "run-command.h"
10 -#include "argv-array.h"
10 +#include "strvec.h"
11
12 static const char upload_archive_usage[] =
13 "git upload-archive <repo>";
builtin/worktree.c
+1 -1
@@ -4,7 +4,7 @@
4 #include "builtin.h"
5 #include "dir.h"
6 #include "parse-options.h"
7 -#include "argv-array.h"
7 +#include "strvec.h"
8 #include "branch.h"
9 #include "refs.h"
10 #include "run-command.h"
bundle.c
+1 -1
@@ -10,7 +10,7 @@
10 #include "list-objects.h"
11 #include "run-command.h"
12 #include "refs.h"
13 -#include "argv-array.h"
13 +#include "strvec.h"
14
15 static const char bundle_signature[] = "# v2 git bundle\n";
16
bundle.h
+1 -1
@@ -1,7 +1,7 @@
1 #ifndef BUNDLE_H
2 #define BUNDLE_H
3
4 -#include "argv-array.h"
4 +#include "strvec.h"
5 #include "cache.h"
6
7 struct ref_list {
diff.c
+1 -1
@@ -20,7 +20,7 @@
20 #include "hashmap.h"
21 #include "ll-merge.h"
22 #include "string-list.h"
23 -#include "argv-array.h"
23 +#include "strvec.h"
24 #include "graph.h"
25 #include "packfile.h"
26 #include "parse-options.h"
environment.c
+1 -1
@@ -14,7 +14,7 @@
14 #include "refs.h"
15 #include "fmt-merge-msg.h"
16 #include "commit.h"
17 -#include "argv-array.h"
17 +#include "strvec.h"
18 #include "object-store.h"
19 #include "chdir-notify.h"
20 #include "shallow.h"
exec-cmd.c
+1 -1
@@ -1,7 +1,7 @@
1 #include "cache.h"
2 #include "exec-cmd.h"
3 #include "quote.h"
4 -#include "argv-array.h"
4 +#include "strvec.h"
5
6 #if defined(RUNTIME_PREFIX)
7
graph.c
+1 -1
@@ -4,7 +4,7 @@
4 #include "color.h"
5 #include "graph.h"
6 #include "revision.h"
7 -#include "argv-array.h"
7 +#include "strvec.h"
8
9 /* Internal API */
10
http-backend.c
+1 -1
@@ -9,7 +9,7 @@
9 #include "run-command.h"
10 #include "string-list.h"
11 #include "url.h"
12 -#include "argv-array.h"
12 +#include "strvec.h"
13 #include "packfile.h"
14 #include "object-store.h"
15 #include "protocol.h"
http-push.c
+1 -1
@@ -11,7 +11,7 @@
11 #include "remote.h"
12 #include "list-objects.h"
13 #include "sigchain.h"
14 -#include "argv-array.h"
14 +#include "strvec.h"
15 #include "packfile.h"
16 #include "object-store.h"
17 #include "commit-reach.h"
line-log.c
+1 -1
@@ -14,7 +14,7 @@
14 #include "graph.h"
15 #include "userdiff.h"
16 #include "line-log.h"
17 -#include "argv-array.h"
17 +#include "strvec.h"
18 #include "bloom.h"
19
20 static void range_set_grow(struct range_set *rs, size_t extra)
list-objects-filter-options.c
+1 -1
@@ -2,7 +2,7 @@
2 #include "commit.h"
3 #include "config.h"
4 #include "revision.h"
5 -#include "argv-array.h"
5 +#include "strvec.h"
6 #include "list-objects.h"
7 #include "list-objects-filter.h"
8 #include "list-objects-filter-options.h"
ls-refs.c
+1 -1
@@ -2,7 +2,7 @@
2 #include "repository.h"
3 #include "refs.h"
4 #include "remote.h"
5 -#include "argv-array.h"
5 +#include "strvec.h"
6 #include "ls-refs.h"
7 #include "pkt-line.h"
8 #include "config.h"
parse-options-cb.c
+1 -1
@@ -4,7 +4,7 @@
4 #include "commit.h"
5 #include "color.h"
6 #include "string-list.h"
7 -#include "argv-array.h"
7 +#include "strvec.h"
8 #include "oid-array.h"
9
10 /*----- some often used options -----*/
pathspec.c
+1 -1
@@ -3,7 +3,7 @@
3 #include "dir.h"
4 #include "pathspec.h"
5 #include "attr.h"
6 -#include "argv-array.h"
6 +#include "strvec.h"
7 #include "quote.h"
8
9 /*
quote.c
+1 -1
@@ -1,6 +1,6 @@
1 #include "cache.h"
2 #include "quote.h"
3 -#include "argv-array.h"
3 +#include "strvec.h"
4
5 int quote_path_fully = 1;
6
range-diff.c
+1 -1
@@ -2,7 +2,7 @@
2 #include "range-diff.h"
3 #include "string-list.h"
4 #include "run-command.h"
5 -#include "argv-array.h"
5 +#include "strvec.h"
6 #include "hashmap.h"
7 #include "xdiff-interface.h"
8 #include "linear-assignment.h"
range-diff.h
+1 -1
@@ -2,7 +2,7 @@
2 #define RANGE_DIFF_H
3
4 #include "diff.h"
5 -#include "argv-array.h"
5 +#include "strvec.h"
6
7 #define RANGE_DIFF_CREATION_FACTOR_DEFAULT 60
8
ref-filter.c
+1 -1
@@ -22,7 +22,7 @@
22 #include "commit-reach.h"
23 #include "worktree.h"
24 #include "hashmap.h"
25 -#include "argv-array.h"
25 +#include "strvec.h"
26
27 static struct ref_msg {
28 const char *gone;
refs.c
+1 -1
@@ -15,7 +15,7 @@
15 #include "tag.h"
16 #include "submodule.h"
17 #include "worktree.h"
18 -#include "argv-array.h"
18 +#include "strvec.h"
19 #include "repository.h"
20 #include "sigchain.h"
21
refspec.c
+1 -1
@@ -1,5 +1,5 @@
1 #include "cache.h"
2 -#include "argv-array.h"
2 +#include "strvec.h"
3 #include "refs.h"
4 #include "refspec.h"
5
remote-curl.c
+1 -1
@@ -10,7 +10,7 @@
10 #include "pkt-line.h"
11 #include "string-list.h"
12 #include "sideband.h"
13 -#include "argv-array.h"
13 +#include "strvec.h"
14 #include "credential.h"
15 #include "oid-array.h"
16 #include "send-pack.h"
remote-testsvn.c
+1 -1
@@ -8,7 +8,7 @@
8 #include "run-command.h"
9 #include "vcs-svn/svndump.h"
10 #include "notes.h"
11 -#include "argv-array.h"
11 +#include "strvec.h"
12
13 static const char *url;
14 static int dump_from_file;
remote.c
+1 -1
@@ -11,7 +11,7 @@
11 #include "tag.h"
12 #include "string-list.h"
13 #include "mergesort.h"
14 -#include "argv-array.h"
14 +#include "strvec.h"
15 #include "commit-reach.h"
16 #include "advice.h"
17
revision.c
+1 -1
@@ -23,7 +23,7 @@
23 #include "bisect.h"
24 #include "packfile.h"
25 #include "worktree.h"
26 -#include "argv-array.h"
26 +#include "strvec.h"
27 #include "commit-reach.h"
28 #include "commit-graph.h"
29 #include "prio-queue.h"
run-command.c
+1 -1
@@ -2,7 +2,7 @@
2 #include "run-command.h"
3 #include "exec-cmd.h"
4 #include "sigchain.h"
5 -#include "argv-array.h"
5 +#include "strvec.h"
6 #include "thread-utils.h"
7 #include "strbuf.h"
8 #include "string-list.h"
run-command.h
+1 -1
@@ -3,7 +3,7 @@
3
4 #include "thread-utils.h"
5
6 -#include "argv-array.h"
6 +#include "strvec.h"
7
8 /**
9 * The run-command API offers a versatile tool to run sub-processes with
sequencer.c
+1 -1
@@ -16,7 +16,7 @@
16 #include "rerere.h"
17 #include "merge-recursive.h"
18 #include "refs.h"
19 -#include "argv-array.h"
19 +#include "strvec.h"
20 #include "quote.h"
21 #include "trailer.h"
22 #include "log-tree.h"
serve.c
+1 -1
@@ -3,7 +3,7 @@
3 #include "config.h"
4 #include "pkt-line.h"
5 #include "version.h"
6 -#include "argv-array.h"
6 +#include "strvec.h"
7 #include "ls-refs.h"
8 #include "serve.h"
9 #include "upload-pack.h"
strvec.c renamed
+1 -1
@@ -1,5 +1,5 @@
1 #include "cache.h"
2 -#include "argv-array.h"
2 +#include "strvec.h"
3 #include "strbuf.h"
4
5 const char *empty_strvec[] = { NULL };
strvec.h renamed
+3 -3
@@ -1,5 +1,5 @@
1 -#ifndef ARGV_ARRAY_H
2 -#define ARGV_ARRAY_H
1 +#ifndef STRVEC_H
2 +#define STRVEC_H
3
4 /**
5 * The argv-array API allows one to dynamically build and store
@@ -99,4 +99,4 @@ const char **strvec_detach(struct strvec *);
99 #define argv_array_clear strvec_clear
100 #define argv_array_detach strvec_detach
101
102 -#endif /* ARGV_ARRAY_H */
102 +#endif /* STRVEC_H */
submodule.c
+1 -1
@@ -13,7 +13,7 @@
13 #include "refs.h"
14 #include "string-list.h"
15 #include "oid-array.h"
16 -#include "argv-array.h"
16 +#include "strvec.h"
17 #include "blob.h"
18 #include "thread-utils.h"
19 #include "quote.h"
t/helper/test-run-command.c
+1 -1
@@ -12,7 +12,7 @@
12 #include "git-compat-util.h"
13 #include "cache.h"
14 #include "run-command.h"
15 -#include "argv-array.h"
15 +#include "strvec.h"
16 #include "strbuf.h"
17 #include "parse-options.h"
18 #include "string-list.h"
t/helper/test-trace2.c
+1 -1
@@ -1,6 +1,6 @@
1 #include "test-tool.h"
2 #include "cache.h"
3 -#include "argv-array.h"
3 +#include "strvec.h"
4 #include "run-command.h"
5 #include "exec-cmd.h"
6 #include "config.h"
tmp-objdir.c
+1 -1
@@ -4,7 +4,7 @@
4 #include "sigchain.h"
5 #include "string-list.h"
6 #include "strbuf.h"
7 -#include "argv-array.h"
7 +#include "strvec.h"
8 #include "quote.h"
9 #include "object-store.h"
10
transport-helper.c
+1 -1
@@ -9,7 +9,7 @@
9 #include "string-list.h"
10 #include "thread-utils.h"
11 #include "sigchain.h"
12 -#include "argv-array.h"
12 +#include "strvec.h"
13 #include "refs.h"
14 #include "refspec.h"
15 #include "transport-internal.h"
unpack-trees.c
+1 -1
@@ -1,5 +1,5 @@
1 #include "cache.h"
2 -#include "argv-array.h"
2 +#include "strvec.h"
3 #include "repository.h"
4 #include "config.h"
5 #include "dir.h"
unpack-trees.h
+1 -1
@@ -2,7 +2,7 @@
2 #define UNPACK_TREES_H
3
4 #include "cache.h"
5 -#include "argv-array.h"
5 +#include "strvec.h"
6 #include "string-list.h"
7 #include "tree-walk.h"
8
upload-pack.c
+1 -1
@@ -18,7 +18,7 @@
18 #include "sigchain.h"
19 #include "version.h"
20 #include "string-list.h"
21 -#include "argv-array.h"
21 +#include "strvec.h"
22 #include "prio-queue.h"
23 #include "protocol.h"
24 #include "quote.h"
wt-status.c
+1 -1
@@ -8,7 +8,7 @@
8 #include "diffcore.h"
9 #include "quote.h"
10 #include "run-command.h"
11 -#include "argv-array.h"
11 +#include "strvec.h"
12 #include "remote.h"
13 #include "refs.h"
14 #include "submodule.h"