Skip to content

Commit

Permalink
upload-pack: Initialize the exec-path.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Sixt authored and Junio C Hamano committed Feb 13, 2008
1 parent f454cdc commit 04b3305
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions upload-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 04b3305

Please sign in to comment.