summaryrefslogtreecommitdiff
path: root/Git.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <id@joeyh.name>2013-05-10 16:29:59 -0500
committerGravatar Joey Hess <id@joeyh.name>2013-05-10 16:29:59 -0500
commit5d0476bf59674b39fa6bad7e4446b5c741181143 (patch)
tree67897681b96fb9e79990033822e1a645de1f96a7 /Git.hs
parent812f7d6c564e297b67850f2aa4751141a8f68e99 (diff)
stub out POSIX stuff
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