No description
Find a file
2020-05-24 12:45:08 -04:00
app Project structure change 2020-05-12 16:21:44 -04:00
src/Git Refactor to use typeclass constraint instead of IO 2020-05-24 12:45:08 -04:00
test Project structure change 2020-05-12 16:21:44 -04:00
.gitignore Update packages and gitignore 2020-05-03 01:33:00 -04:00
ChangeLog.md init: hash-object and cat-file commandscompleted 2020-03-11 00:06:09 -04:00
LICENSE init: hash-object and cat-file commandscompleted 2020-03-11 00:06:09 -04:00
package.yaml readme and package update 2020-05-23 16:15:33 -04:00
README.md readme and package update 2020-05-23 16:15:33 -04:00
Setup.hs init: hash-object and cat-file commandscompleted 2020-03-11 00:06:09 -04:00
stack.yaml Project structure change 2020-05-12 16:21:44 -04:00
stack.yaml.lock Project structure change 2020-05-12 16:21:44 -04:00

git-haskell

About

This project is an implementation of a subset of git commands in Haskell for learning purposes.

Planned implementation

  • Git index (git add)
  • Low level git commands
    • git cat-file
    • git hash-object
    • git commit-tree
    • git ls-tree
  • git checkout
  • git log
  • git status

(Planned) Differences from vanilla git

  • Errors/error messages may be handled differently/different
    • (Currently just throwing exceptions for parse errors/not git directory errors)
  • Not planning to handle every argument for implemented commands just major ones
  • No packfiles

Progress

  • Parse and represent blob files
  • Parse and represent tree files
  • cmd_catfile and cmd_hashfile functions working in library

Learning Documentation

Concepts/Things I've used in this project

  • Parser combinators (megaparsec)
  • Monad transformers (MaybeT)
  • Bang patterns (laziness)
  • Character encodings - Binary encoding vs Base16 vs UTF-8 etc.

Building

Build with stack:

stack build

Testing

TODO