From: Derrick Stolee Date: Wed, 23 Feb 2022 14:29:09 +0000 (+0000) Subject: worktree: combine two translatable messages X-Git-Tag: v2.36.0-rc0~97^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92d92345ce5996933f5cfc357dce1e1744487b6a;p=thirdparty%2Fgit.git worktree: combine two translatable messages 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 Signed-off-by: Derrick Stolee Signed-off-by: Junio C Hamano --- diff --git a/builtin/worktree.c b/builtin/worktree.c index c6eb636329..7c272078dc 100644 --- a/builtin/worktree.c +++ b/builtin/worktree.c @@ -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); }