Created
January 24, 2016 06:28
-
-
Save LeifW/f973c0b7f123a5d94306 to your computer and use it in GitHub Desktop.
What I've been able to figure out of the gitlib API so far.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# Language OverloadedStrings #-} | |
import Git | |
import Git.Libgit2 (lgFactory) | |
import Data.Tagged | |
gitStuff = do | |
Just ref <- resolveReference "HEAD" | |
commit <- lookupCommit $ Tagged ref | |
history <- lookupCommitParents commit | |
return commit | |
main = do | |
headCommit <- withRepository lgFactory "." gitStuff | |
print $ commitAuthor headCommit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment