Open cblp opened 9 years ago
How are we going to read commits and store repository state?
Just like git does. We're building on top of it.
How does git store them internally?
This knowledge is relatively simple, but I don't think we have to know it. We can use some libraries or even git command to get information from repo.
Does this mean that gt is a decorator over git? (we're leveraging on git and giving the user a few shortcuts to work in the "proper way")
Yes, a decorator. I prefer to consider git an engine for gt.
Git is also a file formats and protocols. If gt will also use these formats and protocols, can it be called a decorator?
My reason to call it a decorator is just because gt calls git commands directly without recreating the wheel and reimplementing operations on git files \ protocol.
What kind of libraries are we going to use?
I'm looking at gitlib. It's the only Haskell↔git library existing in Debian and Ubuntu (libghc-gitlib-dev).
But gitlib is only half of binding, it's only interface, and it requires a backend (cmdline [calling git binary], libgit2 [binding to same-named C library], hlibgit2 [yet another libgit2 binding], or hit [pure Haskell library implementing git file formats]), and none of them presents in Ubuntu.
So, when in future we will promote gt into Debian or Ubuntu repository, we'll need some other git library also being packaged. It may be either gitlib backend library or completely different git access library.
So I need to use gitlib to implement gt branch, right?
Yes. Try to use gitlib and install any of its backend (gitlib-libgit2 must work) with cabal.
Good news, everyone!
Now you can add build-depends: gitlib, gitlib-libgit2
into gt.cabal
and follow instructions from master:README.md
.
I tested it in Ubuntu 14.10. If it doesn't install required packages, let me know.
Bad
Good