[PATCH] upload-pack: Initialize the exec-path.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Johannes Schindelin <Johannes.Schindelin@...>
Cc: Jakub Narebski <jnareb@...>, Elijah Newren <newren@...>, <git@...>
Date: Tuesday, February 12, 2008 - 7:28 am

From: Johannes Sixt <johannes.sixt@telecom.at>

Since git-upload-pack has to spawn git-pack-objects, it has to make sure
that the latter can be found in the PATH. Without this patch an attempt
to clone or pull via ssh from a server fails if the git tools are not in
the standard PATH on the server even though git clone or git pull were
invoked with --upload-pack=/path/to/git-upload-pack.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
---
Johannes Schindelin schrieb:

How about this (almost) one-liner instead?

-- Hannes

 upload-pack.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/upload-pack.c b/upload-pack.c
index 7e04311..51e3ec4 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -620,6 +620,9 @@ int main(int argc, char **argv)

 	if (i != argc-1)
 		usage(upload_pack_usage);
+
+	setup_path(NULL);
+
 	dir = argv[i];

 	if (!enter_repo(dir, strict))
-- 
1.5.4.rc3.24.g25a9a

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Unable to clone an ssh repository (with ugly installatio..., Johannes Schindelin, (Tue Feb 12, 6:30 am)
Re: Unable to clone an ssh repository (with ugly installatio..., Stephen Sinclair, (Wed Feb 13, 10:17 am)
[PATCH] upload-pack: Initialize the exec-path., Johannes Sixt, (Tue Feb 12, 7:28 am)
Re: [PATCH] upload-pack: Initialize the exec-path., Johannes Schindelin, (Tue Feb 12, 7:49 am)
Re: [PATCH] upload-pack: Initialize the exec-path., Johannes Schindelin, (Tue Feb 12, 8:45 am)
Re: [PATCH] upload-pack: Initialize the exec-path., Elijah Newren, (Wed Feb 13, 9:00 am)