summaryrefslogtreecommitdiff
path: root/common-main.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2016-07-01 02:07:01 -0400
committerJohannes Schindelin <johannes.schindelin@gmx.de>2016-07-01 15:38:04 +0200
commitf7b8cb849eb35c12c552101841fdfaf8b122918b (patch)
treeba4caef0ca70be555b766585a386689099969a11 /common-main.c
parentbe0c7fe23075541ba8715fee0fe1c605d2cbdcec (diff)
downloadgit-js/common-main.tar.gz
common-main: call git_setup_gettext()js/common-main
This should be part of every program, as otherwise users do not get translated error messages. However, some external commands forgot to do so (e.g., git-credential-store). This fixes them, and eliminates the repeated code in programs that did remember to use it. Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'common-main.c')
-rw-r--r--common-main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/common-main.c b/common-main.c
index 09ef0d5b0c..44a29e8b13 100644
--- a/common-main.c
+++ b/common-main.c
@@ -31,6 +31,8 @@ int main(int argc, const char **argv)
*/
sanitize_stdfds();
+ git_setup_gettext();
+
argv[0] = git_extract_argv0_path(argv[0]);
restore_sigpipe_to_default();