upload-pack: Initialize the exec-path.

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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Johannes Sixt 2008-02-12 12:28:01 +01:00 committed by Junio C Hamano
parent f454cdc48f
commit 04b330551e
1 changed files with 3 additions and 0 deletions

View File

@ -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))