diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-05-14 15:44:08 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-05-14 15:44:08 -0400 |
commit | ca433a6dae1e76a40e741b61113a59e48be575db (patch) | |
tree | 4557066b970e3f7bc5ec5eafa246e4d722a2d513 /Types | |
parent | 9ef82700e53d82b38aed603c5c8033d09fe3cf3f (diff) |
add annex.used-refspec
Diffstat (limited to 'Types')
-rw-r--r-- | Types/GitConfig.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Types/GitConfig.hs b/Types/GitConfig.hs index c0043ec04..aafd97cb9 100644 --- a/Types/GitConfig.hs +++ b/Types/GitConfig.hs @@ -22,6 +22,7 @@ import Types.Distribution import Types.Availability import Types.NumCopies import Types.Difference +import Types.RefSpec import Utility.HumanTime {- Main git-annex settings. Each setting corresponds to a git-config key @@ -59,6 +60,7 @@ data GitConfig = GitConfig , coreSymlinks :: Bool , gcryptId :: Maybe String , annexDifferences :: Differences + , annexUsedRefSpec :: Maybe RefSpec } extractGitConfig :: Git.Repo -> GitConfig @@ -97,6 +99,8 @@ extractGitConfig r = GitConfig , coreSymlinks = getbool "core.symlinks" True , gcryptId = getmaybe "core.gcrypt-id" , annexDifferences = getDifferences r + , annexUsedRefSpec = either (const Nothing) Just . parseRefSpec + =<< getmaybe (annex "used-refspec") } where getbool k d = fromMaybe d $ getmaybebool k |