ctucx.git: nimgit

[nimlang] nim-wrapper for libgit2

commit c227f84b6fee7b8a4eaa80a720b81454f623f567
parent cef4c85266f3a3a0f8a02ee595e1221b5b3ac8c0
Author: Leah (ctucx) <leah@ctu.cx>
Date: Wed, 17 Mar 2021 02:26:43 +0100

update example listAllCommits
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/listAllCommits.nim b/listAllCommits.nim
@@ -19,13 +19,18 @@ try:
     for gitOid in gitRevisionWalker:
         let gitCommit = gitRepository.lookupCommit(gitOid)
 
-        let author = gitCommit.getAuthor()
+        let author    = gitCommit.getAuthor()
+        let committer = gitCommit.getCommitter()
 
         echo "==================="
         echo "hash: " & $gitOid
+        echo "committer: " & committer.name & " <" & committer.email & ">"
         echo "author: " & author.name & " <" & author.email & ">"
         echo "when: " & $author.when.time
         echo "message: " & gitCommit.getSummary()
+        echo "parrentCount: " & $gitCommit.getParrentCount()
+        if gitCommit.getParrentCount > 0:
+            echo "parrent: " & $gitCommit.getParrent()
         echo ""
 
         free(gitCommit)