Re: [PATCH] git-init: set core.worktree if GIT_WORK_TREE is specified
- Date: Wed, 4 Jul 2007 11:29:15 +0200
- From: Matthias Lederhofer <matled@xxxxxxx>
- Subject: Re: [PATCH] git-init: set core.worktree if GIT_WORK_TREE is specified
> + if (!getcwd(cwd, sizeof(cwd)) || cwd[0] != '/')
> + die("Unable to read current working directory");
Dscho just pointed out that this causes problems on windows. The same
is also in setup_git_directory_gently and was there before I touched
it, introduced by Linus in d288a700. What was the original reason to
do this? Are there implementations of getcwd which return a relative
path?
Additionally there are other places which need to check if some user
supplied path is absolute. Should we have a macro/function for that
which depends on the os and checks for path[0] = '/' on unix and
perhaps path[1] = ':' on windows?
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html