]> git.ipfire.org Git - thirdparty/git.git/commitdiff
worktree: combine two translatable messages
authorDerrick Stolee <derrickstolee@github.com>
Wed, 23 Feb 2022 14:29:09 +0000 (14:29 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 Feb 2022 20:24:41 +0000 (12:24 -0800)
These two messages differ only by the config key name, which should not
be translated. Extract those keys so the messages can be translated from
the same string.

Reported-by: Jean-Noël AVILA <jn.avila@free.fr>
Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/worktree.c

index c6eb636329aea77421a0e2af40ae224b18a6d03a..7c272078dc9ebed7049d0c61d6f198d8dd57453c 100644 (file)
@@ -384,11 +384,13 @@ static int add_worktree(const char *path, const char *refname,
                            bare &&
                            git_config_set_multivar_in_file_gently(
                                        to_file, "core.bare", NULL, "true", 0))
-                               error(_("failed to unset 'core.bare' in '%s'"), to_file);
+                               error(_("failed to unset '%s' in '%s'"),
+                                     "core.bare", to_file);
                        if (!git_configset_get_value(&cs, "core.worktree", &core_worktree) &&
                            git_config_set_in_file_gently(to_file,
                                                          "core.worktree", NULL))
-                               error(_("failed to unset 'core.worktree' in '%s'"), to_file);
+                               error(_("failed to unset '%s' in '%s'"),
+                                     "core.worktree", to_file);
 
                        git_configset_clear(&cs);
                }