Here is a new patch series replacing ml/workdir.
Changes:
* rename GIT_WORK_DIR to GIT_WORK_TREE, --work-dir to --work-tree and
core.workdir to core.worktree
* use getcwd and prefixcmp instead of stat to check if cwd is below
GIT_DIR or GIT_WORK_TREE
* rename 'has_working_directory' to 'inside_working_tree'
The first two patches have not changed except for their order in the
series but I repost them anyway for easier review.
Things I'm not sure about how/if to change (see my last mail too)
* is_bare_repository() uses the old check
/* definitely bare */
if (is_bare_repository_cfg == 1)
return 1;
/* GIT_WORK_TREE is set, bare if cwd is outside */
if (inside_working_tree >= 0)
return !inside_working_tree;
/* configuration says it is not bare */
if (is_bare_repository_cfg == 0)
return 0;
* is_bare_repository() in general
* git init does not show the expansion of GIT_WORK_TREE to an
absolute path, this might confuse the user