The hit package

[Tags: bsd3, library]

An haskell implementation of git storage operations, allowing users to manipulate git repositories (read and write).

This implementation is fully interoperable with the main C implementation.

This is stricly only manipulating the git store (what's inside the .git directory), and doesn't do anything with the index or your working directory files.


[Skip to ReadMe]

Properties

Versions0.1.0, 0.2.0, 0.2.1, 0.2.2, 0.3.0, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.6.0, 0.6.1, 0.6.2, 0.6.3
Change logNone available
Dependenciesattoparsec (>=0.10.1), base (==4.*), bytestring (>=0.9), containers, cryptohash, directory, filepath, hashable (>=1.2), hashtables, hit, mtl, parsec (>=3), patience, random, system-fileio, system-filepath, time, vector, zlib, zlib-bindings (==0.1.*) [details]
LicenseBSD3
CopyrightVincent Hanquez <vincent@snarc.org>
AuthorVincent Hanquez <vincent@snarc.org>
MaintainerVincent Hanquez <vincent@snarc.org>
Stabilityexperimental
CategoryDevelopment
Home pagehttp://github.com/vincenthz/hit
Source repositoryhead: git clone git://github.com/vincenthz/hit
ExecutablesHit
UploadedSat Jan 25 16:45:37 UTC 2014 by VincentHanquez
DistributionsDebian:0.6.3, LTSHaskell:0.6.3, Stackage:0.6.3
Downloads3139 total (158 in last 30 days)
Votes
0 []
StatusDocs available [build log]
Successful builds reported [all 1 reports]

Modules

[Index]

Flags

NameDescriptionDefaultType
executableBuild the executableDisabledAutomatic
debugAdd some debugging optionsDisabledAutomatic

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainers' corner

For package maintainers and hackage trustees

Readme for hit-0.5.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.