Skip to content

Commit 5133985

Browse files
committed
fixup! gettext: handle GIT_TEXTDOMAINDIR relative to $(prefix)
In preparation for the more general RUNTIME_PREFIX support, this reverts commit 5ff388f. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent c00e8aa commit 5133985

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

common-main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ int main(int argc, const char **argv)
3232
*/
3333
sanitize_stdfds();
3434

35-
git_extract_argv0_path(argv[0]);
36-
3735
git_setup_gettext();
3836

3937
attr_start();
4038

39+
git_extract_argv0_path(argv[0]);
40+
4141
restore_sigpipe_to_default();
4242

4343
return cmd_main(argc, argv);

gettext.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
#include "gettext.h"
77
#include "strbuf.h"
88
#include "utf8.h"
9-
#include "cache.h"
10-
#include "exec_cmd.h"
119

1210
#ifndef NO_GETTEXT
1311
# include <locale.h>
@@ -162,20 +160,14 @@ static void init_gettext_charset(const char *domain)
162160
void git_setup_gettext(void)
163161
{
164162
const char *podir = getenv("GIT_TEXTDOMAINDIR");
165-
char *p = NULL;
166163

167164
if (!podir)
168165
podir = GIT_LOCALE_PATH;
169-
if (!is_absolute_path(podir))
170-
podir = p = system_path(podir);
171-
172166
bindtextdomain("git", podir);
173167
setlocale(LC_MESSAGES, "");
174168
setlocale(LC_TIME, "");
175169
init_gettext_charset("git");
176170
textdomain("git");
177-
178-
free(p);
179171
}
180172

181173
/* return the number of columns of string 's' in current locale */

0 commit comments

Comments
 (0)