From: Jean-Noël Avila Date: Wed, 5 Jan 2022 20:02:20 +0000 (+0000) Subject: i18n: factorize "no directory given for --foo" X-Git-Tag: v2.35.0-rc0~3^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=986cd6556c000a460d499fafb7cd0a8d9220b57d;p=thirdparty%2Fgit.git i18n: factorize "no directory given for --foo" Signed-off-by: Jean-Noël Avila Reviewed-by: Johannes Sixt Signed-off-by: Junio C Hamano --- diff --git a/git.c b/git.c index 7edafd8ecf..edda922ce6 100644 --- 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]) {