Fix bug that broke switching between local repositories in the webapp when they use the new guarded direct mode.
git treats eg ~/annex as a bare git repository located in ~/.annex/.git if ~/annex/.git/config has core.bare=true.
This commit is contained in:
parent
b9cdb55e0c
commit
0980f3dae6
2 changed files with 9 additions and 2 deletions
|
@ -110,8 +110,13 @@ store s repo = do
|
||||||
-}
|
-}
|
||||||
updateLocation :: Repo -> IO Repo
|
updateLocation :: Repo -> IO Repo
|
||||||
updateLocation r@(Repo { location = LocalUnknown d })
|
updateLocation r@(Repo { location = LocalUnknown d })
|
||||||
| isBare r = updateLocation' r $ Local d Nothing
|
| isBare r = ifM (doesDirectoryExist dotgit)
|
||||||
| otherwise = updateLocation' r $ Local (d </> ".git") (Just d)
|
( updateLocation' r $ Local dotgit Nothing
|
||||||
|
, updateLocation' r $ Local d Nothing
|
||||||
|
)
|
||||||
|
| otherwise = updateLocation' r $ Local dotgit (Just d)
|
||||||
|
where
|
||||||
|
dotgit = (d </> ".git")
|
||||||
updateLocation r@(Repo { location = l@(Local {}) }) = updateLocation' r l
|
updateLocation r@(Repo { location = l@(Local {}) }) = updateLocation' r l
|
||||||
updateLocation r = return r
|
updateLocation r = return r
|
||||||
|
|
||||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -9,6 +9,8 @@ git-annex (5.20131121) UNRELEASED; urgency=low
|
||||||
and either prompt the user to restart the program, or automatically
|
and either prompt the user to restart the program, or automatically
|
||||||
restart it.
|
restart it.
|
||||||
* annex.autoupgrade configures both the above upgrade behaviors.
|
* annex.autoupgrade configures both the above upgrade behaviors.
|
||||||
|
* Fix bug that broke switching between local repositories
|
||||||
|
in the webapp when they use the new guarded direct mode.
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Wed, 20 Nov 2013 18:30:47 -0400
|
-- Joey Hess <joeyh@debian.org> Wed, 20 Nov 2013 18:30:47 -0400
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue