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

@ -12,6 +12,7 @@ import Annex.View.ViewedFile
import Types.View
import Types.MetaData
import Annex.MetaData
import qualified Annex
import qualified Git
import qualified Git.DiffTree as DiffTree
import qualified Git.Branch
@ -30,7 +31,6 @@ import Logs.View
import Utility.Glob
import Types.Command
import CmdLine.Action
import Config.CommitMode
import qualified Data.Text as T
import qualified Data.ByteString as B
@ -419,7 +419,7 @@ withViewIndex a = do
genViewBranch :: View -> Annex Git.Branch
genViewBranch view = withViewIndex $ do
let branch = branchView view
cmode <- implicitCommitMode
cmode <- annexCommitMode <$> Annex.getGitConfig
void $ inRepo $ Git.Branch.commit cmode True (fromRef branch) branch []
return branch