git-annex/Config/CommitMode.hs
Joey Hess 3b34d123ed
Added annex.allowsign option.
This commit was sponsored by Ilya Shlyakhter on Patreon.
2019-11-11 16:28:56 -04:00

18 lines
408 B
Haskell

{- git-annex configuration
-
- Copyright 2019 Joey Hess <id@joeyh.name>
-
- Licensed under the GNU AGPL version 3 or higher.
-}
module Config.CommitMode where
import Annex.Common
import qualified Annex
import Git.Branch (CommitMode(..))
implicitCommitMode :: Annex CommitMode
implicitCommitMode = go . annexAllowSign <$> Annex.getGitConfig
where
go True = ManualCommit
go False = AutomaticCommit