summaryrefslogtreecommitdiff
path: root/Git/Version.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Git/Version.hs')
-rw-r--r--Git/Version.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Git/Version.hs b/Git/Version.hs
index 1c53b4bfd..73ce2f81d 100644
--- a/Git/Version.hs
+++ b/Git/Version.hs
@@ -7,6 +7,7 @@
module Git.Version (
installed,
+ older,
normalize,
GitVersion,
) where
@@ -22,3 +23,8 @@ installed = normalize . extract <$> readProcess "git" ["--version"]
extract s = case lines s of
[] -> ""
(l:_) -> unwords $ drop 2 $ words l
+
+older :: String -> IO Bool
+older n = do
+ v <- installed
+ return $ v < normalize n