]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git.c
Merge branch 'ab/ambiguous-object-name'
[thirdparty/git.git] / git.c
diff --git a/git.c b/git.c
index 7edafd8ecffb3c7d13274f474207da2ca3195725..340665d4a044dbdb71981b0699102efa97895556 100644 (file)
--- a/git.c
+++ b/git.c
@@ -185,7 +185,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
                                *envchanged = 1;
                } else if (!strcmp(cmd, "--git-dir")) {
                        if (*argc < 2) {
-                               fprintf(stderr, _("no directory given for --git-dir\n" ));
+                               fprintf(stderr, _("no directory given for '%s' option\n" ), "--git-dir");
                                usage(git_usage_string);
                        }
                        setenv(GIT_DIR_ENVIRONMENT, (*argv)[1], 1);
@@ -213,7 +213,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
                                *envchanged = 1;
                } else if (!strcmp(cmd, "--work-tree")) {
                        if (*argc < 2) {
-                               fprintf(stderr, _("no directory given for --work-tree\n" ));
+                               fprintf(stderr, _("no directory given for '%s' option\n" ), "--work-tree");
                                usage(git_usage_string);
                        }
                        setenv(GIT_WORK_TREE_ENVIRONMENT, (*argv)[1], 1);
@@ -297,7 +297,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
                                *envchanged = 1;
                } else if (!strcmp(cmd, "-C")) {
                        if (*argc < 2) {
-                               fprintf(stderr, _("no directory given for -C\n" ));
+                               fprintf(stderr, _("no directory given for '%s' option\n" ), "-C");
                                usage(git_usage_string);
                        }
                        if ((*argv)[1][0]) {
@@ -541,6 +541,7 @@ static struct cmd_struct commands[] = {
        { "grep", cmd_grep, RUN_SETUP_GENTLY },
        { "hash-object", cmd_hash_object },
        { "help", cmd_help },
+       { "hook", cmd_hook, RUN_SETUP },
        { "index-pack", cmd_index_pack, RUN_SETUP_GENTLY | NO_PARSEOPT },
        { "init", cmd_init_db },
        { "init-db", cmd_init_db },