summaryrefslogtreecommitdiff
path: root/Build/Configure.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-08-02 18:31:01 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-08-02 18:32:26 -0400
commitaddc505584876cca50ccdcd1c982e9a5e10ec9b1 (patch)
tree9da1fe90f8d96a038f939a9fc05d64c7af7e3369 /Build/Configure.hs
parent5921e627d75758101ccb38f76c83c3917ae897b7 (diff)
better git version checking
Diffstat (limited to 'Build/Configure.hs')
-rw-r--r--Build/Configure.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/Build/Configure.hs b/Build/Configure.hs
index 3195bcdcf..15b90ebe3 100644
--- a/Build/Configure.hs
+++ b/Build/Configure.hs
@@ -17,6 +17,7 @@ import Utility.SafeCommand
import Utility.Monad
import Utility.Exception
import Utility.ExternalSHA
+import qualified Git.Version
tests :: [TestCase]
tests =
@@ -121,10 +122,8 @@ getChangelogVersion = do
middle = drop 1 . init
getGitVersion :: Test
-getGitVersion = do
- s <- readProcess "git" ["--version"] ""
- let version = unwords $ drop 2 $ words $ head $ lines s
- return $ Config "gitversion" (StringConfig version)
+getGitVersion = Config "gitversion" . StringConfig . show
+ <$> Git.Version.installed
getSshConnectionCaching :: Test
getSshConnectionCaching = Config "sshconnectioncaching" . BoolConfig <$>