{"thread":{"id":"15519","subject":"[PATCH] Start conforming code to \"git subcmd\" style part 3","startedAt":"2008-09-13T17:18:36Z","lastAt":"2008-09-16T04:09:41Z","messageCount":2,"participants":["Heikki Orsila","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"90643","messageId":"20080913171836.GA5597@zakalwe.fi","threadId":"15519","inReplyTo":null,"subject":"[PATCH] Start conforming code to \"git subcmd\" style part 3","fromName":"Heikki Orsila","fromEmail":"heikki.orsila@iki.fi","sentAt":"2008-09-13T17:18:36Z","receivedAt":"2008-09-13T17:18:36Z","isPatch":true,"sender":{"key":"heikki.orsila@iki.fi","avatar":null},"body":"User notifications are presented as 'git cmd', and code comments\nare presented as '\"cmd\"' or 'git's cmd', rather than 'git-cmd'.\n\nSigned-off-by: Heikki Orsila <heikki.orsila@iki.fi>\n---\nPart 3 resent. A small fix from Thomas Rast for builtin-tar-tree.c.\n\n builtin-init-db.c        |    2 +-\n builtin-pack-objects.c   |    4 ++--\n builtin-read-tree.c      |    2 +-\n builtin-rev-list.c       |    2 +-\n builtin-rm.c             |    2 +-\n builtin-send-pack.c      |    2 +-\n builtin-tar-tree.c       |   14 +++++++-------\n builtin-unpack-objects.c |    2 +-\n builtin-update-index.c   |    8 ++++----\n 9 files changed, 19 insertions(+), 19 deletions(-)\n\ndiff --git a/builtin-init-db.c b/builtin-init-db.c\nindex baf0d09..8140c12 100644\n--- a/builtin-init-db.c\n+++ b/builtin-init-db.c\n@@ -37,7 +37,7 @@ static void copy_templates_1(char *path, int baselen,\n \n \t/* Note: if \".git/hooks\" file exists in the repository being\n \t * re-initialized, /etc/core-git/templates/hooks/update would\n-\t * cause git-init to fail here.  I think this is sane but\n+\t * cause \"git init\" to fail here.  I think this is sane but\n \t * it means that the set of templates we ship by default, along\n \t * with the way the namespace under .git/ is organized, should\n \t * be really carefully chosen.\ndiff --git a/builtin-pack-objects.c b/builtin-pack-objects.c\nindex ba2cf00..217fd49 100644\n--- a/builtin-pack-objects.c\n+++ b/builtin-pack-objects.c\n@@ -23,7 +23,7 @@\n #endif\n \n static const char pack_usage[] = \"\\\n-git-pack-objects [{ -q | --progress | --all-progress }] \\n\\\n+git pack-objects [{ -q | --progress | --all-progress }] \\n\\\n \t[--max-pack-size=N] [--local] [--incremental] \\n\\\n \t[--window=N] [--window-memory=N] [--depth=N] \\n\\\n \t[--no-reuse-delta] [--no-reuse-object] [--delta-base-offset] \\n\\\n@@ -1872,7 +1872,7 @@ static void mark_in_pack_object(struct object *object, struct packed_git *p, str\n \n /*\n  * Compare the objects in the offset order, in order to emulate the\n- * \"git-rev-list --objects\" output that produced the pack originally.\n+ * \"git rev-list --objects\" output that produced the pack originally.\n  */\n static int ofscmp(const void *a_, const void *b_)\n {\ndiff --git a/builtin-read-tree.c b/builtin-read-tree.c\nindex dddc304..ac219ac 100644\n--- a/builtin-read-tree.c\n+++ b/builtin-read-tree.c\n@@ -64,7 +64,7 @@ static void prime_cache_tree(void)\n \n }\n \n-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>]])\";\n+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>]])\";\n \n static struct lock_file lock_file;\n \ndiff --git a/builtin-rev-list.c b/builtin-rev-list.c\nindex c023003..facaff2 100644\n--- a/builtin-rev-list.c\n+++ b/builtin-rev-list.c\n@@ -178,7 +178,7 @@ static void finish_object(struct object_array_entry *p)\n static void show_object(struct object_array_entry *p)\n {\n \t/* An object with name \"foo\\n0000000...\" can be used to\n-\t * confuse downstream git-pack-objects very badly.\n+\t * confuse downstream \"git pack-objects\" very badly.\n \t */\n \tconst char *ep = strchr(p->name, '\\n');\n \ndiff --git a/builtin-rm.c b/builtin-rm.c\nindex 6bd8211..fdac34f 100644\n--- a/builtin-rm.c\n+++ b/builtin-rm.c\n@@ -104,7 +104,7 @@ static int check_local_mod(unsigned char *head, int index_only)\n \t\t\t\t     \"from both the file and the HEAD\\n\"\n \t\t\t\t     \"(use -f to force removal)\", name);\n \t\telse if (!index_only) {\n-\t\t\t/* It's not dangerous to git-rm --cached a\n+\t\t\t/* It's not dangerous to \"git rm --cached\" a\n \t\t\t * file if the index matches the file or the\n \t\t\t * HEAD, since it means the deleted content is\n \t\t\t * still available somewhere.\ndiff --git a/builtin-send-pack.c b/builtin-send-pack.c\nindex 7588d22..2af9f29 100644\n--- a/builtin-send-pack.c\n+++ b/builtin-send-pack.c\n@@ -43,7 +43,7 @@ static int pack_objects(int fd, struct ref *refs)\n \tpo.out = fd;\n \tpo.git_cmd = 1;\n \tif (start_command(&po))\n-\t\tdie(\"git-pack-objects failed (%s)\", strerror(errno));\n+\t\tdie(\"git pack-objects failed (%s)\", strerror(errno));\n \n \t/*\n \t * We feed the pack-objects we just spawned with revision\ndiff --git a/builtin-tar-tree.c b/builtin-tar-tree.c\nindex cb7007e..419a69b 100644\n--- a/builtin-tar-tree.c\n+++ b/builtin-tar-tree.c\n@@ -9,19 +9,19 @@\n \n static const char tar_tree_usage[] =\n \"git tar-tree [--remote=<repo>] <tree-ish> [basedir]\\n\"\n-\"*** Note that this command is now deprecated; use git-archive instead.\";\n+\"*** Note that this command is now deprecated; use \\\"git archive\\\" instead.\";\n \n int cmd_tar_tree(int argc, const char **argv, const char *prefix)\n {\n \t/*\n-\t * git-tar-tree is now a wrapper around git-archive --format=tar\n+\t * \"git tar-tree\" is now a wrapper around \"git archive --format=tar\"\n \t *\n \t * $0 --remote=<repo> arg... ==>\n-\t *\tgit-archive --format=tar --remote=<repo> arg...\n+\t *\tgit archive --format=tar --remote=<repo> arg...\n \t * $0 tree-ish ==>\n-\t *\tgit-archive --format=tar tree-ish\n+\t *\tgit archive --format=tar tree-ish\n \t * $0 tree-ish basedir ==>\n-\t * \tgit-archive --format-tar --prefix=basedir tree-ish\n+\t * \tgit archive --format-tar --prefix=basedir tree-ish\n \t */\n \tint i;\n \tconst char **nargv = xcalloc(sizeof(*nargv), argc + 2);\n@@ -53,8 +53,8 @@ int cmd_tar_tree(int argc, const char **argv, const char *prefix)\n \tnargv[nargc] = NULL;\n \n \tfprintf(stderr,\n-\t\t\"*** git-tar-tree is now deprecated.\\n\"\n-\t\t\"*** Running git-archive instead.\\n***\");\n+\t\t\"*** \\\"git tar-tree\\\" is now deprecated.\\n\"\n+\t\t\"*** Running \\\"git archive\\\" instead.\\n***\");\n \tfor (i = 0; i < nargc; i++) {\n \t\tfputc(' ', stderr);\n \t\tsq_quote_print(stderr, nargv[i]);\ndiff --git a/builtin-unpack-objects.c b/builtin-unpack-objects.c\nindex a891866..40b20f2 100644\n--- a/builtin-unpack-objects.c\n+++ b/builtin-unpack-objects.c\n@@ -13,7 +13,7 @@\n #include \"fsck.h\"\n \n static int dry_run, quiet, recover, has_errors, strict;\n-static const char unpack_usage[] = \"git-unpack-objects [-n] [-q] [-r] [--strict] < pack-file\";\n+static const char unpack_usage[] = \"git unpack-objects [-n] [-q] [-r] [--strict] < pack-file\";\n \n /* We always read in 4kB chunks. */\n static unsigned char buffer[4096];\ndiff --git a/builtin-update-index.c b/builtin-update-index.c\nindex ce83224..417f972 100644\n--- a/builtin-update-index.c\n+++ b/builtin-update-index.c\n@@ -14,7 +14,7 @@\n  * Default to not allowing changes to the list of files. The\n  * tool doesn't actually care, but this makes it harder to add\n  * files to the revision control by mistake by doing something\n- * like \"git-update-index *\" and suddenly having all the object\n+ * like \"git update-index *\" and suddenly having all the object\n  * files be revision controlled.\n  */\n static int allow_add;\n@@ -313,18 +313,18 @@ static void read_index_info(int line_termination)\n \t\t/* This reads lines formatted in one of three formats:\n \t\t *\n \t\t * (1) mode         SP sha1          TAB path\n-\t\t * The first format is what \"git-apply --index-info\"\n+\t\t * The first format is what \"git apply --index-info\"\n \t\t * reports, and used to reconstruct a partial tree\n \t\t * that is used for phony merge base tree when falling\n \t\t * back on 3-way merge.\n \t\t *\n \t\t * (2) mode SP type SP sha1          TAB path\n-\t\t * The second format is to stuff git-ls-tree output\n+\t\t * The second format is to stuff \"git ls-tree\" output\n \t\t * into the index file.\n \t\t *\n \t\t * (3) mode         SP sha1 SP stage TAB path\n \t\t * This format is to put higher order stages into the\n-\t\t * index file and matches git-ls-files --stage output.\n+\t\t * index file and matches \"git ls-files --stage\" output.\n \t\t */\n \t\terrno = 0;\n \t\tul = strtoul(buf.buf, &ptr, 8);\n-- \n1.6.0.1\n"},{"id":"90799","messageId":"7v7i9c91fe.fsf@gitster.siamese.dyndns.org","threadId":"15519","inReplyTo":"20080913171836.GA5597@zakalwe.fi","subject":"Re: [PATCH] Start conforming code to \"git subcmd\" style part 3","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-09-16T04:09:41Z","receivedAt":"2008-09-16T04:09:41Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Heikki Orsila <heikki.orsila@iki.fi> writes:\n\n> User notifications are presented as 'git cmd', and code comments\n> are presented as '\"cmd\"' or 'git's cmd', rather than 'git-cmd'.\n>\n> Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi>\n> ---\n> Part 3 resent. A small fix from Thomas Rast for builtin-tar-tree.c.\n\nI did not see anything wrong in the patch; thanks.\n"}]}