diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-09-09 18:06:49 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-09-09 18:06:49 -0400 |
commit | 71863ac267113e79e2c6260361a4c1850b979b99 (patch) | |
tree | 6e7e4b78de91bd1b67096455343d21647c596ebe /Types | |
parent | 7c5af228ec0438c9ac40832311fd00ba07374abe (diff) |
support gpg.program
When gpg.program is configured, it's used to get the command to run for
gpg. Useful on systems that have only a gpg2 command or want to use it
instead of the gpg command.
Diffstat (limited to 'Types')
-rw-r--r-- | Types/GitConfig.hs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Types/GitConfig.hs b/Types/GitConfig.hs index 0f02a5270..419a5e4c1 100644 --- a/Types/GitConfig.hs +++ b/Types/GitConfig.hs @@ -25,6 +25,7 @@ import Types.NumCopies import Types.Difference import Types.RefSpec import Utility.HumanTime +import Utility.Gpg (GpgCmd, mkGpgCmd) {- Main git-annex settings. Each setting corresponds to a git-config key - such as annex.foo -} @@ -58,11 +59,12 @@ data GitConfig = GitConfig , annexListen :: Maybe String , annexStartupScan :: Bool , annexHardLink :: Bool + , annexDifferences :: Differences + , annexUsedRefSpec :: Maybe RefSpec , coreSymlinks :: Bool , coreSharedRepository :: SharedRepository , gcryptId :: Maybe String - , annexDifferences :: Differences - , annexUsedRefSpec :: Maybe RefSpec + , gpgCmd :: GpgCmd } extractGitConfig :: Git.Repo -> GitConfig @@ -98,12 +100,13 @@ extractGitConfig r = GitConfig , annexListen = getmaybe (annex "listen") , annexStartupScan = getbool (annex "startupscan") True , annexHardLink = getbool (annex "hardlink") False - , coreSymlinks = getbool "core.symlinks" True - , coreSharedRepository = getSharedRepository r - , gcryptId = getmaybe "core.gcrypt-id" , annexDifferences = getDifferences r , annexUsedRefSpec = either (const Nothing) Just . parseRefSpec =<< getmaybe (annex "used-refspec") + , coreSymlinks = getbool "core.symlinks" True + , coreSharedRepository = getSharedRepository r + , gcryptId = getmaybe "core.gcrypt-id" + , gpgCmd = mkGpgCmd (getmaybe "gpg.program") } where getbool k d = fromMaybe d $ getmaybebool k |