Skip to content

Commit

Permalink
receive-pack: Initialize PATH to include exec-dir.
Browse files Browse the repository at this point in the history
511707d (use only the $PATH for exec'ing git commands) made it a
requirement to call setup_path() to include the git exec-dir in PATH
before spawning any other git commands. git-receive-pack was not yet
adapted to do this and therefore fails to spawn git-unpack-objects if that
is not in the standard PATH.

Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Björn Steinbrink authored and Junio C Hamano committed Mar 3, 2008
1 parent 84989bd commit 5c09f32
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions receive-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,8 @@ int main(int argc, char **argv)
if (!dir)
usage(receive_pack_usage);

setup_path(NULL);

if (!enter_repo(dir, 0))
die("'%s': unable to chdir or not a git archive", dir);

Expand Down

0 comments on commit 5c09f32

Please sign in to comment.