Code

Start conforming code to "git subcmd" style part 2
authorHeikki Orsila <heikki.orsila@iki.fi>
Tue, 9 Sep 2008 10:28:30 +0000 (13:28 +0300)
committerJunio C Hamano <gitster@pobox.com>
Tue, 9 Sep 2008 15:41:29 +0000 (08:41 -0700)
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>
builtin-checkout-index.c
builtin-commit-tree.c
builtin-fetch-pack.c
builtin-fetch.c
builtin-http-fetch.c

index 90f8523eb5c92555637c99f0fe52925a3ef7d09e..55b7aafe06680fa51729ddb7fa97f9cd319a470e 100644 (file)
@@ -5,26 +5,26 @@
  *
  * Careful: order of argument flags does matter. For example,
  *
  *
  * Careful: order of argument flags does matter. For example,
  *
- *     git-checkout-index -a -f file.c
+ *     git checkout-index -a -f file.c
  *
  * Will first check out all files listed in the cache (but not
  * overwrite any old ones), and then force-checkout "file.c" a
  * second time (ie that one _will_ overwrite any old contents
  * with the same filename).
  *
  *
  * Will first check out all files listed in the cache (but not
  * overwrite any old ones), and then force-checkout "file.c" a
  * second time (ie that one _will_ overwrite any old contents
  * with the same filename).
  *
- * Also, just doing "git-checkout-index" does nothing. You probably
- * meant "git-checkout-index -a". And if you want to force it, you
- * want "git-checkout-index -f -a".
+ * Also, just doing "git checkout-index" does nothing. You probably
+ * meant "git checkout-index -a". And if you want to force it, you
+ * want "git checkout-index -f -a".
  *
  * Intuitiveness is not the goal here. Repeatability is. The
  * reason for the "no arguments means no work" thing is that
  * from scripts you are supposed to be able to do things like
  *
  *
  * Intuitiveness is not the goal here. Repeatability is. The
  * reason for the "no arguments means no work" thing is that
  * from scripts you are supposed to be able to do things like
  *
- *     find . -name '*.h' -print0 | xargs -0 git-checkout-index -f --
+ *     find . -name '*.h' -print0 | xargs -0 git checkout-index -f --
  *
  * or:
  *
  *
  * or:
  *
- *     find . -name '*.h' -print0 | git-checkout-index -f -z --stdin
+ *     find . -name '*.h' -print0 | git checkout-index -f -z --stdin
  *
  * which will force all existing *.h files to be replaced with
  * their cached copies. If an empty command line implied "all",
  *
  * which will force all existing *.h files to be replaced with
  * their cached copies. If an empty command line implied "all",
@@ -107,7 +107,7 @@ static int checkout_file(const char *name, int prefix_length)
        }
 
        if (!state.quiet) {
        }
 
        if (!state.quiet) {
-               fprintf(stderr, "git-checkout-index: %s ", name);
+               fprintf(stderr, "git checkout-index: %s ", name);
                if (!has_same_name)
                        fprintf(stderr, "is not in the cache");
                else if (checkout_stage)
                if (!has_same_name)
                        fprintf(stderr, "is not in the cache");
                else if (checkout_stage)
index 291c43cf70d7906b770911a7bcb2cdff9c6182e7..9b84c48dce0938f4f2884565dc25308d51c7a423 100644 (file)
@@ -24,7 +24,7 @@ static void check_valid(unsigned char *sha1, enum object_type expect)
                    typename(expect));
 }
 
                    typename(expect));
 }
 
-static const char commit_tree_usage[] = "git-commit-tree <sha1> [-p <sha1>]* < changelog";
+static const char commit_tree_usage[] = "git commit-tree <sha1> [-p <sha1>]* < changelog";
 
 static void new_parent(struct commit *parent, struct commit_list **parents_p)
 {
 
 static void new_parent(struct commit *parent, struct commit_list **parents_p)
 {
index 6b37281a956892db676ad0b6e8c38b5d82316797..85509f5ee5884589980c9a1c5f96b66a3d49d5dd 100644 (file)
@@ -750,7 +750,7 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix)
        if (!ret && nr_heads) {
                /* If the heads to pull were given, we should have
                 * consumed all of them by matching the remote.
        if (!ret && nr_heads) {
                /* If the heads to pull were given, we should have
                 * consumed all of them by matching the remote.
-                * Otherwise, 'git-fetch remote no-such-ref' would
+                * Otherwise, 'git fetch remote no-such-ref' would
                 * silently succeed without issuing an error.
                 */
                for (i = 0; i < nr_heads; i++)
                 * silently succeed without issuing an error.
                 */
                for (i = 0; i < nr_heads; i++)
index 7eec4a0e43ad5760f1060a7d5bcf2a5083015130..ee93d3a93da0267caa485fa552c29d779aecfdf7 100644 (file)
@@ -86,10 +86,10 @@ static void add_merge_config(struct ref **head,
                /*
                 * Not fetched to a tracking branch?  We need to fetch
                 * it anyway to allow this branch's "branch.$name.merge"
                /*
                 * Not fetched to a tracking branch?  We need to fetch
                 * it anyway to allow this branch's "branch.$name.merge"
-                * to be honored by git-pull, but we do not have to
+                * to be honored by 'git pull', but we do not have to
                 * fail if branch.$name.merge is misconfigured to point
                 * at a nonexisting branch.  If we were indeed called by
                 * fail if branch.$name.merge is misconfigured to point
                 * at a nonexisting branch.  If we were indeed called by
-                * git-pull, it will notice the misconfiguration because
+                * 'git pull', it will notice the misconfiguration because
                 * there is no entry in the resulting FETCH_HEAD marked
                 * for merging.
                 */
                 * there is no entry in the resulting FETCH_HEAD marked
                 * for merging.
                 */
@@ -396,7 +396,7 @@ static int store_updated_refs(const char *url, const char *remote_name,
  * The refs we are going to fetch are in to_fetch (nr_heads in
  * total).  If running
  *
  * The refs we are going to fetch are in to_fetch (nr_heads in
  * total).  If running
  *
- *  $ git-rev-list --objects to_fetch[0] to_fetch[1] ... --not --all
+ *  $ git rev-list --objects to_fetch[0] to_fetch[1] ... --not --all
  *
  * does not error out, that means everything reachable from the
  * refs we are going to fetch exists and is connected to some of
  *
  * does not error out, that means everything reachable from the
  * refs we are going to fetch exists and is connected to some of
index 3a062487a7eacd01ed824b46a9124dd343cd2e60..03f34d767ddfc3c7bc9b18d28ec7350d47564679 100644 (file)
@@ -42,7 +42,7 @@ int cmd_http_fetch(int argc, const char **argv, const char *prefix)
                arg++;
        }
        if (argc < arg + 2 - commits_on_stdin) {
                arg++;
        }
        if (argc < arg + 2 - commits_on_stdin) {
-               usage("git-http-fetch [-c] [-t] [-a] [-v] [--recover] [-w ref] [--stdin] commit-id url");
+               usage("git http-fetch [-c] [-t] [-a] [-v] [--recover] [-w ref] [--stdin] commit-id url");
                return 1;
        }
        if (commits_on_stdin) {
                return 1;
        }
        if (commits_on_stdin) {
@@ -75,7 +75,7 @@ int cmd_http_fetch(int argc, const char **argv, const char *prefix)
                fprintf(stderr,
 "Some loose object were found to be corrupt, but they might be just\n"
 "a false '404 Not Found' error message sent with incorrect HTTP\n"
                fprintf(stderr,
 "Some loose object were found to be corrupt, but they might be just\n"
 "a false '404 Not Found' error message sent with incorrect HTTP\n"
-"status code.  Suggest running git-fsck.\n");
+"status code.  Suggest running 'git fsck'.\n");
        }
 
        walker_free(walker);
        }
 
        walker_free(walker);