summaryrefslogtreecommitdiff
path: root/Git/CurrentRepo.hs
Commit message (Collapse)AuthorAge
* Fix handling of GIT_DIR when it refers to a git submodule.Gravatar Joey Hess2012-10-17
| | | | | | The old code was just wrong in taking fromPath of GIT_DIR -- that made an localUnknown location with the GIT_DIR in it, which only worked by accident, and failed in submodules.
* ensure that gitdir is absoluteGravatar Joey Hess2012-10-16
| | | | | | | | calcGitLink turns out to need it to be absolute, and it normally is, but not if it's read from a .git file in a submodule, or perhaps from GIT_DIR. I should look into dropping this invariant.
* A relative core.worktree is relative to the gitdir.Gravatar Joey Hess2012-10-16
| | | | | | | | Now that this is handled correctly, git-annex can be used in git submodules. Also, fixed infelicity where Git.CurrentRepo and Git.Config.updateLocation were both dealing with core.worktree. Now updateLocation handles it for Local as well as for LocalUnknown repos.
* simplifyGravatar Joey Hess2012-10-15
|
* more worktree improvementsGravatar Joey Hess2012-05-19
| | | | | | | | | 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.
* avoid chdir when already inside worktreeGravatar Joey Hess2012-05-19
|
* make GIT_DIR, GIT_WORK_TREE absoluteGravatar Joey Hess2012-05-18
| | | | | GIT_DIR is set to something relative, like ".git" in the pre-commit hook. But internally all the directories are assumed to be absolute.
* Add support for core.worktree, and fix support for GIT_WORK_TREE and GIT_DIR.Gravatar Joey Hess2012-05-18
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.