]> git.ipfire.org Git - thirdparty/git.git/commitdiff
i18n: factorize "no directory given for --foo"
authorJean-Noël Avila <jn.avila@free.fr>
Wed, 5 Jan 2022 20:02:20 +0000 (20:02 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 5 Jan 2022 21:31:00 +0000 (13:31 -0800)
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
Reviewed-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git.c

diff --git a/git.c b/git.c
index 7edafd8ecffb3c7d13274f474207da2ca3195725..edda922ce6d423b8b734b47b979f4912b9a4d281 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]) {