git-annex/Git
Joey Hess 43f19ef00a
Fix bug that made bare repos be treated as non-bare when --git-dir was used.
Eg:

git clone url --bare r
git --git-dir r annex init

This resulted in worktree = Just "." and so several things that check
worktree to determine when the repo is bare ran code paths intended for
non-bare. One such code path[1] ran git checkout with --worktree=. which
actually makes it ignore core.bare config, and so the current directory
got populated with a checkout of the master branch in this example. There
was probably also other breakage.

The fix is a bit complicated because whether the repo is bare is not
known until after Git.Config reads the config, but Git.Config handles
setting the RepoLocations's worktree when core.worktree is set. So have
to assume the worktree is the cwd, let core.worktree override that,
and then if the repo turns out to be bare, it's set back to Nothing.
(And then GIT_WORK_TREE can still override all of that.)

[1] switchHEADBack, which runs even when the clone is not from a bare repo.
2019-11-21 13:26:02 -04:00
..
Command
Remote Removed support for git versions older than 2.1 2019-09-11 16:14:43 -04:00
AutoCorrect.hs update wording to match current wording in git 2019-09-15 19:01:05 -04:00
Branch.hs Removed support for git versions older than 2.1 2019-09-11 16:14:43 -04:00
BuildVersion.hs
CatFile.hs work around windows having infected git's plumbing 2019-10-08 15:27:05 -04:00
CheckAttr.hs Removed support for git versions older than 2.1 2019-09-11 16:14:43 -04:00
CheckIgnore.hs Removed support for git versions older than 2.1 2019-09-11 16:14:43 -04:00
Command.hs
Config.hs git-lfs: remember urls, and autoenable remotes using known urls 2019-11-18 16:09:09 -04:00
ConfigTypes.hs
Construct.hs
Credential.hs typo 2019-09-24 14:34:15 -04:00
CurrentRepo.hs Fix bug that made bare repos be treated as non-bare when --git-dir was used. 2019-11-21 13:26:02 -04:00
DiffTree.hs
DiffTreeItem.hs
Env.hs
FileMode.hs
Filename.hs
FilePath.hs benchmark: Add --databases to benchmark sqlite databases 2019-10-29 16:59:27 -04:00
Fsck.hs Removed support for git versions older than 2.1 2019-09-11 16:14:43 -04:00
GCrypt.hs
HashObject.hs
History.hs
Hook.hs
Index.hs v7 for all repositories 2019-08-30 14:09:14 -04:00
LockFile.hs
LsFiles.hs
LsTree.hs
Merge.hs Removed support for git versions older than 2.1 2019-09-11 16:14:43 -04:00
Objects.hs
Queue.hs remove one more warningIO 2019-11-12 10:45:52 -04:00
Ref.hs
RefLog.hs
Remote.hs git-lfs: remember urls, and autoenable remotes using known urls 2019-11-18 16:09:09 -04:00
Repair.hs
Sha.hs
Ssh.hs
Status.hs
Tree.hs sync: Fix crash when there are submodules and an adjusted branch is checked out 2019-10-23 11:52:56 -04:00
Types.hs
UnionMerge.hs
UpdateIndex.hs
Url.hs
Version.hs