Readme for hit-0.6.3

Hit

Hit is a reimplementation of some git operations in pure haskell.

what it does do:

what is doesn't do:

The main functions for users are available from the Data.Git module.

The essential functions are:

API Example

resolving path of the README file and returning the reference to the blob :

{-# LANGUAGE OverloadedStrings #-}
import Data.Git.Repository

showPathRef commitRef = withRepo ".git" $ \git -> do
    ref <- maybe (error "inexistent object at this path") id `fmap` resolvePath git commitRef ["README"]
    putStrLn ("README has the reference: " ++ show ref)

catting an object from a ref:

import Data.Git.Repository

catFile ref = withRepo ".git" $ \git -> do
    obj <- maybe (error "not a valid object") id `fmap` getObjectRaw git ref True
    L.putStrLn (oiData obj)

more examples on how to use api can be found in Hit.hs.