Skip to content

Commit

Permalink
Fix "do not DWIM" patch to enter_repo"
Browse files Browse the repository at this point in the history
We wanted --strict to mean "do not DWIM", but the code required to
see absolute path.  daemon does its own path verification and chdirs
to the verified repository, so enter_repo() called from upload-pack
will always enter ".".  Requiring absolute path does not make any sense.

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Nov 21, 2005
1 parent 936a234 commit e0a8719
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion path.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ char *enter_repo(char *path, int strict)
return NULL;

if (strict) {
if((path[0] != '/') || chdir(path) < 0)
if (chdir(path) < 0)
return NULL;
}
else {
Expand Down

0 comments on commit e0a8719

Please sign in to comment.