Skip to content

Commit 986cd65

Browse files
jnavilagitster
authored andcommitted
i18n: factorize "no directory given for --foo"
Signed-off-by: Jean-Noël Avila <[email protected]> Reviewed-by: Johannes Sixt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6fa00ee commit 986cd65

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

git.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
185185
*envchanged = 1;
186186
} else if (!strcmp(cmd, "--git-dir")) {
187187
if (*argc < 2) {
188-
fprintf(stderr, _("no directory given for --git-dir\n" ));
188+
fprintf(stderr, _("no directory given for '%s' option\n" ), "--git-dir");
189189
usage(git_usage_string);
190190
}
191191
setenv(GIT_DIR_ENVIRONMENT, (*argv)[1], 1);
@@ -213,7 +213,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
213213
*envchanged = 1;
214214
} else if (!strcmp(cmd, "--work-tree")) {
215215
if (*argc < 2) {
216-
fprintf(stderr, _("no directory given for --work-tree\n" ));
216+
fprintf(stderr, _("no directory given for '%s' option\n" ), "--work-tree");
217217
usage(git_usage_string);
218218
}
219219
setenv(GIT_WORK_TREE_ENVIRONMENT, (*argv)[1], 1);
@@ -297,7 +297,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
297297
*envchanged = 1;
298298
} else if (!strcmp(cmd, "-C")) {
299299
if (*argc < 2) {
300-
fprintf(stderr, _("no directory given for -C\n" ));
300+
fprintf(stderr, _("no directory given for '%s' option\n" ), "-C");
301301
usage(git_usage_string);
302302
}
303303
if ((*argv)[1][0]) {

0 commit comments

Comments
 (0)