Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fcharlie/hgit
Haskell Git https://bitbucket.org/ssaasen/git-in-haskell-from-the-bottom-up.git
https://github.com/fcharlie/hgit
Last synced: 7 days ago
JSON representation
Haskell Git https://bitbucket.org/ssaasen/git-in-haskell-from-the-bottom-up.git
- Host: GitHub
- URL: https://github.com/fcharlie/hgit
- Owner: fcharlie
- License: other
- Created: 2015-08-23T12:55:25.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-23T12:56:24.000Z (about 9 years ago)
- Last Synced: 2024-01-20T04:00:26.286Z (10 months ago)
- Language: Haskell
- Size: 211 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Implementing git clone in Haskell
Source code for the [git clone in Haskell from the bottom up](http://stefan.saasen.me/articles/git-clone-in-haskell-from-the-bottom-up/) article.
The `hgit` executable created by this cabal package supports a very limited number of operations, most notably the `clone` command:
hgit clone git://github.com/juretta/git-pastiche.git
Apart from `clone` the following commands are supported:* `ls-remote`: Because it's already implemented as part of the clone operation
* `unpack`: Unpack a raw pack file (whithout the need to have an index file for the pack) into a git repository
* `read-index`: Similar to `git ls-files --debug` this shows the information in the git index file (expects a path to the index file though and is not required to be executed within the git repository).[4766] λ > hgit read-index .git/index .ghci
.ghci
ctime: 1363781495
mtime: 1363781495
dev: 16777220 inode: 9756391
uid: 501 gid: 20
size: 59 git file mode: Regular
sha1: c364d6f7508e2f6d1607a9d73e6330d68ec7d62a## Build
To build the binary run
cabal configure
cabal build
If any of the dependencies are missing run:
cabal install --only-dependencies
To copy it into the cabal bin directory that should be in the $PATH, run
cabal copy
There is a simple Rakefile that can be used to build the binary and to run the test suite:[4832] λ > rake -T
rake build # Build the hgit binary
rake clean # Clean artifacts
rake deps # Install required dependencies
rake dev:tags # Generate a ctags file
rake test # Run the tests
## TestsTo run the tests directly run:
cabal clean
cabal configure --enable-tests
cabal build
cabal test --show-details=always