Commit graph

4 commits

Author SHA1 Message Date
Joey Hess
ebbd24e5ed more worktree improvements
Avoid more expensive code path when no core.worktree is configured.

Don't change worktree when reading config if one is already set.
This could happen if GIT_CORE_WORKTREE is set, and the repo also has
core.worktree, and the config is reread. Now GIT_CORE_WORKTREE will
prevail.
2012-05-19 11:08:50 -04:00
Joey Hess
9d98144776 avoid chdir when already inside worktree 2012-05-19 10:37:28 -04:00
Joey Hess
a1885bd116 make GIT_DIR, GIT_WORK_TREE absolute
GIT_DIR is set to something relative, like ".git" in the pre-commit hook.
But internally all the directories are assumed to be absolute.
2012-05-18 18:32:19 -04:00
Joey Hess
eb6cb1b87f Add support for core.worktree, and fix support for GIT_WORK_TREE and GIT_DIR.
The environment needs to override git-config. Changed when git config is
read, and avoid rereading it once it's been read.

chdir for both worktree settings.
2012-05-18 18:20:53 -04:00