Skip to content

Commit

Permalink
pack: move packPath to Git.Pack
Browse files Browse the repository at this point in the history
  • Loading branch information
kfish committed Apr 22, 2011
1 parent cba37b6 commit 5a6d68a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
16 changes: 15 additions & 1 deletion Git/Pack.hs
@@ -1,19 +1,33 @@
module Git.Pack (
-- * Pack object
Pack(..),
packParse,
packPretty
packPretty,

-- * Paths
packPath
) where

import qualified Data.ByteString.Lazy.Char8 as C
import qualified Data.ByteString.Lazy as L
import Data.Binary.Get
import Data.Word
import System.FilePath

import Git.Path

------------------------------------------------------------

data Pack = Pack {
packVersion :: Word32,
packNumObjects :: Word32
}

------------------------------------------------------------

-- | Generate the pathname for a given packfile
packPath pack = gitPath ("objects" </> "pack" </> ("pack-" ++ pack ++ ".pack"))

------------------------------------------------------------
-- packParse
--
Expand Down
3 changes: 0 additions & 3 deletions tools/ght.hs
Expand Up @@ -151,9 +151,6 @@ prettyPack bs
where
packHeader = C.pack "PACK"

-- | Generate the pathname for a given packfile
packPath pack = gitPath ("objects" </> "pack" </> ("pack-" ++ pack ++ ".pack"))

------------------------------------------------------------
-- it-pack
--
Expand Down

0 comments on commit 5a6d68a

Please sign in to comment.