Better to not have a single function module, and better to have a more
specific type than Bool.

This commit was sponsored by Jack Hill on Patreon
This commit is contained in:
Joey Hess 2019-11-11 18:20:35 -04:00
parent 3b34d123ed
commit 0be23bae2f
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
11 changed files with 23 additions and 44 deletions

View file

@ -22,7 +22,6 @@ import Logs.PreferredContent
import qualified Annex.Branch
import Utility.Process.Transcript
import Config
import Config.CommitMode
{- Makes a new git repository. Or, if a git repository already
- exists, returns False. -}
@ -55,7 +54,7 @@ initRepo True primary_assistant_repo dir desc mgroup = inDir dir $ do
{- Initialize the master branch, so things that expect
- to have it will work, before any files are added. -}
unlessM (Git.Config.isBare <$> gitRepo) $ do
cmode <- implicitCommitMode
cmode <- annexCommitMode <$> Annex.getGitConfig
void $ inRepo $ Git.Branch.commitCommand cmode
[ Param "--quiet"
, Param "--allow-empty"