diff --git a/Assistant/Sync.hs b/Assistant/Sync.hs index b071bc80fd..1e94335eff 100644 --- a/Assistant/Sync.hs +++ b/Assistant/Sync.hs @@ -155,5 +155,6 @@ manualPull currentbranch remotes = do syncNewRemote :: Remote -> Assistant () syncNewRemote remote = do updateSyncRemotes - thread <- asIO2 reconnectRemotes - void $ liftIO $ forkIO $ thread False [remote] + thread <- asIO $ do + reconnectRemotes False [remote] + void $ liftIO $ forkIO $ thread diff --git a/Assistant/WebApp/Configurators/Local.hs b/Assistant/WebApp/Configurators/Local.hs index fbf748d55c..1ef1eb447b 100644 --- a/Assistant/WebApp/Configurators/Local.hs +++ b/Assistant/WebApp/Configurators/Local.hs @@ -20,6 +20,7 @@ import Init import qualified Git import qualified Git.Construct import qualified Git.Config +import qualified Git.Command import qualified Annex import Locations.UserConfig import Utility.FreeDesktop @@ -281,11 +282,19 @@ inDir dir a = do state <- Annex.new =<< Git.Config.read =<< Git.Construct.fromPath dir Annex.eval state a -{- Initializes a git-annex repository in a directory with a description. -} initRepo :: FilePath -> Maybe String -> IO UUID initRepo dir desc = inDir dir $ do + {- Initialize a git-annex repository in a directory with a description. -} unlessM isInitialized $ initialize desc + unlessM (Git.Config.isBare <$> gitRepo) $ + {- Initialize the master branch, so things that expect + - to have it will work, before any files are added. -} + void $ inRepo $ Git.Command.runBool "commit" + [ Param "--allow-empty" + , Param "-m" + , Param "created repository" + ] getUUID {- Adds a directory to the autostart file. -} diff --git a/debian/changelog b/debian/changelog index 34d8199494..36a7253a6b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -33,6 +33,7 @@ git-annex (3.20121018) UNRELEASED; urgency=low to test a key's presence. * The standalone tarball's runshell now takes care of installing a ~/.ssh/git-annex-shell wrapper the first time it's run. + * webapp: Make an initial, empty commit so there is a master branch -- Joey Hess Wed, 17 Oct 2012 14:24:10 -0400