summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeah (ctucx) <leah@ctu.cx>2021-03-17 02:26:43 +0100
committerLeah (ctucx) <leah@ctu.cx>2021-03-17 02:26:43 +0100
commitc227f84b6fee7b8a4eaa80a720b81454f623f567 (patch)
tree1895fc71c27b2a31cdc126154b9723759eef3894
parentcef4c85266f3a3a0f8a02ee595e1221b5b3ac8c0 (diff)
downloadnimgit-c227f84b6fee7b8a4eaa80a720b81454f623f567.tar.gz
nimgit-c227f84b6fee7b8a4eaa80a720b81454f623f567.tar.bz2
nimgit-c227f84b6fee7b8a4eaa80a720b81454f623f567.zip
update example listAllCommits
-rw-r--r--listAllCommits.nim7
1 files changed, 6 insertions, 1 deletions
diff --git a/listAllCommits.nim b/listAllCommits.nim
index 3543381..45abfc8 100644
--- 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)