commit immediately when adding removable drive repo

I noticed that adding a removable drive repo, then trying to add the same
drive again resulted in the question about whether repos should be
combined. This was because the uuid.log was not updated. Which happened
because the new uuid did not get committed on the removable drive.
This fixes that.
This commit is contained in:
Joey Hess 2013-09-16 14:56:19 -04:00
parent 7936cc646d
commit f53526501d

View file

@ -398,8 +398,12 @@ initRepo False _ dir desc = inDir dir $ do
initRepo' :: Maybe String -> Annex ()
initRepo' desc = do
unlessM isInitialized $
unlessM isInitialized $ do
initialize desc
{- Ensure branch gets committed right away so it is
- available for merging when a removable drive repo is being
- added. -}
Annex.Branch.commit "update"
{- Checks if the user can write to a directory.
-