1. Stefan Saasen
  2. git-in-haskell-from-the-bottom-up

Commits

Stefan Saasen  committed 22ab66e

Lift ObjectId into the Common module

  • Participants
  • Parent commits 1d5fff8
  • Branches master

Comments (0)

Files changed (4)

File src/Git/Common.hs

View file
   , isMsbSet
   , eitherToMaybe
   , GitRepository(..)
+  , ObjectId
 ) where
 
 import Text.Printf      (printf)
 import Numeric          (showHex)
 import Data.Bits        (Bits, (.&.))
 
+type ObjectId = String
+
 data GitRepository = GitRepository {
     getName         :: String
 } deriving (Show, Eq)

File src/Git/Repository.hs

View file
 import Data.Char                                            (isSpace)
 import Debug.Trace
 
-type ObjectId = String
-
 -- | Updates files in the working tree to match the given <tree-ish>
 --
 --

File src/Git/Store/Blob.hs

View file
 import Data.Maybe                                           (isJust, fromJust)
 import Text.Printf                                          (printf)
 import Git.Pack.Packfile
-import Git.Pack.Delta                                      (patch)
-import Git.Common                                           (eitherToMaybe)
+import Git.Pack.Delta                                       (patch)
+import Git.Common                                           (eitherToMaybe, ObjectId)
 import System.FilePath
 import System.Directory
 import Control.Monad                                        (unless, liftM)
 -}
 
 
-type ObjectId = String
 {-
 data TreeNode = TreeNode {
     obj  :: GitObject

File src/Git/Store/ObjectStore.hs

View file
 import Text.Printf                                          (printf)
 import Git.Pack.Packfile
 import Git.Pack.Delta                                       (patch)
-import Git.Common                                           (GitRepository(..), eitherToMaybe)
+import Git.Common                                           (GitRepository(..), eitherToMaybe, ObjectId)
 -- Tree
 import Git.Store.Blob
 import System.FilePath
 import Data.Char                                            (isSpace)
 import Debug.Trace
 
-type ObjectId = String
-
 
 data Object = ResolvedObject {
     getObjectType   :: PackObjectType