]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin-update-index.c
'git foo' program identifies itself without dash in die() messages
[thirdparty/git.git] / builtin-update-index.c
index d4c85c0cbc6fec3d526cc57d8b748b1f1a82b9a1..e5bb2a03cbc047392b866ad1128cba58f98af5ba 100644 (file)
@@ -262,7 +262,7 @@ static void chmod_path(int flip, const char *path)
        report("chmod %cx '%s'", flip, path);
        return;
  fail:
-       die("git-update-index: cannot chmod %cx '%s'", flip, path);
+       die("git update-index: cannot chmod %cx '%s'", flip, path);
 }
 
 static void update_one(const char *path, const char *prefix, int prefix_length)
@@ -280,7 +280,7 @@ static void update_one(const char *path, const char *prefix, int prefix_length)
 
        if (force_remove) {
                if (remove_file_from_cache(p))
-                       die("git-update-index: unable to remove %s", path);
+                       die("git update-index: unable to remove %s", path);
                report("remove '%s'", path);
                goto free_return;
        }
@@ -351,7 +351,7 @@ static void read_index_info(int line_termination)
                if (line_termination && path_name[0] == '"') {
                        strbuf_reset(&uq);
                        if (unquote_c_style(&uq, path_name, NULL)) {
-                               die("git-update-index: bad quoting of path name");
+                               die("git update-index: bad quoting of path name");
                        }
                        path_name = uq.buf;
                }
@@ -364,7 +364,7 @@ static void read_index_info(int line_termination)
                if (!mode) {
                        /* mode == 0 means there is no such path -- remove */
                        if (remove_file_from_cache(path_name))
-                               die("git-update-index: unable to remove %s",
+                               die("git update-index: unable to remove %s",
                                    ptr);
                }
                else {
@@ -374,7 +374,7 @@ static void read_index_info(int line_termination)
                         */
                        ptr[-42] = ptr[-1] = 0;
                        if (add_cacheinfo(mode, sha1, path_name, stage))
-                               die("git-update-index: unable to update %s",
+                               die("git update-index: unable to update %s",
                                    path_name);
                }
                continue;
@@ -387,7 +387,7 @@ static void read_index_info(int line_termination)
 }
 
 static const char update_index_usage[] =
-"git-update-index [-q] [--add] [--replace] [--remove] [--unmerged] [--refresh] [--really-refresh] [--cacheinfo] [--chmod=(+|-)x] [--assume-unchanged] [--info-only] [--force-remove] [--stdin] [--index-info] [--unresolve] [--again | -g] [--ignore-missing] [-z] [--verbose] [--] <file>...";
+"git update-index [-q] [--add] [--replace] [--remove] [--unmerged] [--refresh] [--really-refresh] [--cacheinfo] [--chmod=(+|-)x] [--assume-unchanged] [--info-only] [--force-remove] [--stdin] [--index-info] [--unresolve] [--again | -g] [--ignore-missing] [-z] [--verbose] [--] <file>...";
 
 static unsigned char head_sha1[20];
 static unsigned char merge_head_sha1[20];
@@ -567,7 +567,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
        int lock_error = 0;
        struct lock_file *lock_file;
 
-       git_config(git_default_config);
+       git_config(git_default_config, NULL);
 
        /* We can't free this memory, it becomes part of a linked list parsed atexit() */
        lock_file = xcalloc(1, sizeof(struct lock_file));
@@ -626,12 +626,12 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
                                unsigned int mode;
 
                                if (i+3 >= argc)
-                                       die("git-update-index: --cacheinfo <mode> <sha1> <path>");
+                                       die("git update-index: --cacheinfo <mode> <sha1> <path>");
 
                                if (strtoul_ui(argv[i+1], 8, &mode) ||
                                    get_sha1_hex(argv[i+2], sha1) ||
                                    add_cacheinfo(mode, sha1, argv[i+3], 0))
-                                       die("git-update-index: --cacheinfo"
+                                       die("git update-index: --cacheinfo"
                                            " cannot add %s", argv[i+3]);
                                i += 3;
                                continue;
@@ -639,7 +639,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
                        if (!strcmp(path, "--chmod=-x") ||
                            !strcmp(path, "--chmod=+x")) {
                                if (argc <= i+1)
-                                       die("git-update-index: %s <path>", path);
+                                       die("git update-index: %s <path>", path);
                                set_executable_bit = path[8];
                                continue;
                        }