aboutsummaryrefslogtreecommitdiff
path: root/Git/FileMode.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-09-13 13:49:28 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-09-13 13:49:28 -0400
commit7ca1389ca8a8786e7ddb3ae8954efbffb97a7713 (patch)
tree1cf6364f405fd5c43eb012f394e97079c5d6f8f8 /Git/FileMode.hs
parenta82f5af34e255253b38e7862436fc86f96316cda (diff)
sync: Fix bug that caused direct mode mappings to not be updated when merging files into the tree on Windows.
Diffstat (limited to 'Git/FileMode.hs')
-rw-r--r--Git/FileMode.hs20
1 files changed, 20 insertions, 0 deletions
diff --git a/Git/FileMode.hs b/Git/FileMode.hs
new file mode 100644
index 000000000..d42df9833
--- /dev/null
+++ b/Git/FileMode.hs
@@ -0,0 +1,20 @@
+{- git file modes
+ -
+ - Copyright 2013 Joey Hess <joey@kitenet.net>
+ -
+ - Licensed under the GNU GPL version 3 or higher.
+ -}
+
+{-# LANGUAGE CPP #-}
+
+module Git.FileMode where
+
+import Utility.FileMode
+
+import System.PosixCompat.Types
+
+{- Git uses a special file mode to indicate a symlink. This is the case
+ - even on Windows, so we hard code the valuse here, rather than using
+ - System.Posix.Files.symbolicLinkMode. -}
+isSymLink :: FileMode -> Bool
+isSymLink = checkMode 40960