Commits

Stefan Saasen committed d8ad8e9

Reorder imports

Comments (0)

Files changed (1)

src/Git/Store/Index.hs

 import qualified Data.ByteString.Lazy as L
 import qualified Codec.Binary.UTF8.String as CS (encode)
 import qualified Crypto.Hash.SHA1 as SHA1
-import Git.Common
-import Git.Store.ObjectStore                 (getGitDirectory)
 import Data.Char                             (ord)
-import System.FilePath
 import Data.Function                         (on)
+import Data.List                             (sortBy)
+import Git.Store.ObjectStore                 (getGitDirectory)
+import Git.Common
+import System.FilePath
 import Data.Word
 import Data.Bits
 import Data.Binary.Builder
 import System.Posix.Types
 import Data.Monoid
 import Data.Binary
-import Data.List                            (sortBy)
 
 
 data Index = Index {
 -}
 
 {-
-    ??? This doesn't add up?
     32-bit mode, split into (high to low bits)
         4-bit object type
           valid values in binary are 1000 (regular file), 1010 (symbolic link)
 
 indexHeader :: Word32 -> Builder
 indexHeader num =
-        putWord32be magic   -- The signature is { 'D', 'I', 'R', 'C' } (stands for "dircache")
+        putWord32be magic      -- The signature is { 'D', 'I', 'R', 'C' } (stands for "dircache")
         <> putWord32be 2       -- Version (2, 3 or 4, we use version 2)
         <> putWord32be num     -- Number of index entries
     where magic = fromOctets $ map (fromIntegral . ord) "DIRC"