summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorJean-Noël Avila <jn.avila@free.fr>2022-01-05 20:02:20 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-01-05 21:31:00 (GMT)
commit986cd6556c000a460d499fafb7cd0a8d9220b57d (patch)
tree41625d755dc550e50c7b334601999ffb2f4b5651 /git.c
parent6fa00ee843cb6c8e720180b4642590f5bcc9c8cf (diff)
downloadgit-986cd6556c000a460d499fafb7cd0a8d9220b57d.zip
git-986cd6556c000a460d499fafb7cd0a8d9220b57d.tar.gz
git-986cd6556c000a460d499fafb7cd0a8d9220b57d.tar.bz2
i18n: factorize "no directory given for --foo"
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>
Diffstat (limited to 'git.c')
-rw-r--r--git.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/git.c b/git.c
index 7edafd8..edda922 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]) {