summaryrefslogtreecommitdiff
path: root/Git.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Git.hs')
-rwxr-xr-x[-rw-r--r--]Git.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/Git.hs b/Git.hs
index 46f995e77..c7c82ee93 100644..100755
--- a/Git.hs
+++ b/Git.hs
@@ -8,6 +8,8 @@
- Licensed under the GNU GPL version 3 or higher.
-}
+{-# LANGUAGE CPP #-}
+
module Git (
Repo(..),
Ref(..),
@@ -30,7 +32,9 @@ module Git (
) where
import Network.URI (uriPath, uriScheme, unEscapeString)
+#if 0
import System.Posix.Files
+#endif
import Common
import Git.Types
@@ -127,4 +131,8 @@ hookPath script repo = do
ifM (catchBoolIO $ isexecutable hook)
( return $ Just hook , return Nothing )
where
+#if __WINDOWS__
+ isexecutable f = doesFileExist f
+#else
isexecutable f = isExecutable . fileMode <$> getFileStatus f
+#endif