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

Start conforming code to "git subcmd" style part 3

User notifications are presented as 'git cmd', and code comments are presented as '"cmd"' or 'git's cmd', rather than 'git-cmd'. Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Heikki Orsila committed Sep 13, 2008 at 20:18 UTC f18d244a6356947cf0fb753b43c0d6ac4c7b5637
9 files changed +19 -19
builtin-init-db.c
+1 -1
@@ -37,7 +37,7 @@ static void copy_templates_1(char *path, int baselen,
37
38 /* Note: if ".git/hooks" file exists in the repository being
39 * re-initialized, /etc/core-git/templates/hooks/update would
40 - * cause git-init to fail here. I think this is sane but
40 + * cause "git init" to fail here. I think this is sane but
41 * it means that the set of templates we ship by default, along
42 * with the way the namespace under .git/ is organized, should
43 * be really carefully chosen.
builtin-pack-objects.c
+2 -2
@@ -23,7 +23,7 @@
23 #endif
24
25 static const char pack_usage[] = "\
26 -git-pack-objects [{ -q | --progress | --all-progress }] \n\
26 +git pack-objects [{ -q | --progress | --all-progress }] \n\
27 [--max-pack-size=N] [--local] [--incremental] \n\
28 [--window=N] [--window-memory=N] [--depth=N] \n\
29 [--no-reuse-delta] [--no-reuse-object] [--delta-base-offset] \n\
@@ -1872,7 +1872,7 @@ static void mark_in_pack_object(struct object *object, struct packed_git *p, str
1872
1873 /*
1874 * Compare the objects in the offset order, in order to emulate the
1875 - * "git-rev-list --objects" output that produced the pack originally.
1875 + * "git rev-list --objects" output that produced the pack originally.
1876 */
1877 static int ofscmp(const void *a_, const void *b_)
1878 {
builtin-read-tree.c
+1 -1
@@ -64,7 +64,7 @@ static void prime_cache_tree(void)
64
65 }
66
67 -static const char read_tree_usage[] = "git-read-tree (<sha> | [[-m [--trivial] [--aggressive] | --reset | --prefix=<prefix>] [-u | -i]] [--exclude-per-directory=<gitignore>] [--index-output=<file>] <sha1> [<sha2> [<sha3>]])";
67 +static const char read_tree_usage[] = "git read-tree (<sha> | [[-m [--trivial] [--aggressive] | --reset | --prefix=<prefix>] [-u | -i]] [--exclude-per-directory=<gitignore>] [--index-output=<file>] <sha1> [<sha2> [<sha3>]])";
68
69 static struct lock_file lock_file;
70
builtin-rev-list.c
+1 -1
@@ -178,7 +178,7 @@ static void finish_object(struct object_array_entry *p)
178 static void show_object(struct object_array_entry *p)
179 {
180 /* An object with name "foo\n0000000..." can be used to
181 - * confuse downstream git-pack-objects very badly.
181 + * confuse downstream "git pack-objects" very badly.
182 */
183 const char *ep = strchr(p->name, '\n');
184
builtin-rm.c
+1 -1
@@ -104,7 +104,7 @@ static int check_local_mod(unsigned char *head, int index_only)
104 "from both the file and the HEAD\n"
105 "(use -f to force removal)", name);
106 else if (!index_only) {
107 - /* It's not dangerous to git-rm --cached a
107 + /* It's not dangerous to "git rm --cached" a
108 * file if the index matches the file or the
109 * HEAD, since it means the deleted content is
110 * still available somewhere.
builtin-send-pack.c
+1 -1
@@ -43,7 +43,7 @@ static int pack_objects(int fd, struct ref *refs)
43 po.out = fd;
44 po.git_cmd = 1;
45 if (start_command(&po))
46 - die("git-pack-objects failed (%s)", strerror(errno));
46 + die("git pack-objects failed (%s)", strerror(errno));
47
48 /*
49 * We feed the pack-objects we just spawned with revision
builtin-tar-tree.c
+7 -7
@@ -9,19 +9,19 @@
9
10 static const char tar_tree_usage[] =
11 "git tar-tree [--remote=<repo>] <tree-ish> [basedir]\n"
12 -"*** Note that this command is now deprecated; use git-archive instead.";
12 +"*** Note that this command is now deprecated; use \"git archive\" instead.";
13
14 int cmd_tar_tree(int argc, const char **argv, const char *prefix)
15 {
16 /*
17 - * git-tar-tree is now a wrapper around git-archive --format=tar
17 + * "git tar-tree" is now a wrapper around "git archive --format=tar"
18 *
19 * $0 --remote=<repo> arg... ==>
20 - * git-archive --format=tar --remote=<repo> arg...
20 + * git archive --format=tar --remote=<repo> arg...
21 * $0 tree-ish ==>
22 - * git-archive --format=tar tree-ish
22 + * git archive --format=tar tree-ish
23 * $0 tree-ish basedir ==>
24 - * git-archive --format-tar --prefix=basedir tree-ish
24 + * git archive --format-tar --prefix=basedir tree-ish
25 */
26 int i;
27 const char **nargv = xcalloc(sizeof(*nargv), argc + 2);
@@ -53,8 +53,8 @@ int cmd_tar_tree(int argc, const char **argv, const char *prefix)
53 nargv[nargc] = NULL;
54
55 fprintf(stderr,
56 - "*** git-tar-tree is now deprecated.\n"
57 - "*** Running git-archive instead.\n***");
56 + "*** \"git tar-tree\" is now deprecated.\n"
57 + "*** Running \"git archive\" instead.\n***");
58 for (i = 0; i < nargc; i++) {
59 fputc(' ', stderr);
60 sq_quote_print(stderr, nargv[i]);
builtin-unpack-objects.c
+1 -1
@@ -13,7 +13,7 @@
13 #include "fsck.h"
14
15 static int dry_run, quiet, recover, has_errors, strict;
16 -static const char unpack_usage[] = "git-unpack-objects [-n] [-q] [-r] [--strict] < pack-file";
16 +static const char unpack_usage[] = "git unpack-objects [-n] [-q] [-r] [--strict] < pack-file";
17
18 /* We always read in 4kB chunks. */
19 static unsigned char buffer[4096];
builtin-update-index.c
+4 -4
@@ -14,7 +14,7 @@
14 * Default to not allowing changes to the list of files. The
15 * tool doesn't actually care, but this makes it harder to add
16 * files to the revision control by mistake by doing something
17 - * like "git-update-index *" and suddenly having all the object
17 + * like "git update-index *" and suddenly having all the object
18 * files be revision controlled.
19 */
20 static int allow_add;
@@ -310,18 +310,18 @@ static void read_index_info(int line_termination)
310 /* This reads lines formatted in one of three formats:
311 *
312 * (1) mode SP sha1 TAB path
313 - * The first format is what "git-apply --index-info"
313 + * The first format is what "git apply --index-info"
314 * reports, and used to reconstruct a partial tree
315 * that is used for phony merge base tree when falling
316 * back on 3-way merge.
317 *
318 * (2) mode SP type SP sha1 TAB path
319 - * The second format is to stuff git-ls-tree output
319 + * The second format is to stuff "git ls-tree" output
320 * into the index file.
321 *
322 * (3) mode SP sha1 SP stage TAB path
323 * This format is to put higher order stages into the
324 - * index file and matches git-ls-files --stage output.
324 + * index file and matches "git ls-files --stage" output.
325 */
326 errno = 0;
327 ul = strtoul(buf.buf, &ptr, 8);