git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git-upload-pack: Setup exec_path before gettext

From
Vincent van Ravesteijn <vfr@lyx.org>
Date
Jun 6, 2012, 13:03 UTC
Message-ID
<1338987809-7212-1-git-send-email-vfr@lyx.org>
In-Reply-To
<1338987675-7388-1-git-send-email-vfr@lyx.org>

If RUNTIME_PREFIX is set, git_setup_gettext() uses system_path() to find the directory with po-files. The function system_path() needs the exec_path so this needs to be setup first before setting up gettext().

Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
---
 upload-pack.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/upload-pack.c b/upload-pack.c
index bb08e2e..f5ba770 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -791,10 +791,11 @@ int main(int argc, char **argv)
 	int i;
 	int strict = 0;
 
-	git_setup_gettext();
-
 	packet_trace_identity("upload-pack");
 	git_extract_argv0_path(argv[0]);
+	
+	git_setup_gettext();
+
 	read_replace_refs = 0;
 
 	for (i = 1; i < argc; i++) {
-- 
1.7.9.msysgit.0
Previous: Vincent van RavesteijnNext: Junio C Hamano
Message 2 of 3 in “Use system_path to find 'po'-dir to resolve relative paths”
  1. Use system_path to find 'po'-dir to resolve relative pathsVincent van Ravesteijn, Jun 6, 2012
  2. git-upload-pack: Setup exec_path before gettextVincent van Ravesteijn, Jun 6, 2012
  3. Junio C HamanoJun 6, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.