summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeah (ctucx) <leah@ctu.cx>2021-03-18 01:42:48 +0100
committerLeah (ctucx) <leah@ctu.cx>2021-03-18 01:42:48 +0100
commit8648e2ab324a4e59ae61f47df37cb4319bcdd823 (patch)
treec66b906064d66f4f4446a8c544d7acff6c637e99
parent847719ba79186611709a0c46cea41d83578dbda1 (diff)
downloadnimgit-8648e2ab324a4e59ae61f47df37cb4319bcdd823.tar.gz
nimgit-8648e2ab324a4e59ae61f47df37cb4319bcdd823.tar.bz2
nimgit-8648e2ab324a4e59ae61f47df37cb4319bcdd823.zip
update example showLastCommit
-rw-r--r--showLastCommit.nim10
1 files changed, 5 insertions, 5 deletions
diff --git a/showLastCommit.nim b/showLastCommit.nim
index 98482df..4e62960 100644
--- a/showLastCommit.nim
+++ b/showLastCommit.nim
@@ -1,4 +1,4 @@
-import os, times
+import os, times, posix, strutils
import nimgit
if paramCount() == 0:
@@ -36,14 +36,14 @@ try:
echo ""
- echo "tree:"
- echo "========="
+ echo "tree of that commit:"
+ echo "======================"
for entry in tree:
if entry.type == goTree:
for entry in tree:
- echo $entry.id & " " & $entry.mode & " " & $entry.type & " " & entry.name
+ echo $entry.id & " " & entry.modeStr & " " & $entry.type & " " & entry.name
else:
- echo $entry.id & " " & $entry.mode & " " & $entry.type & " " & entry.name
+ echo $entry.id & " " & entry.modeStr & " " & $entry.type & " " & entry.name
free(tree)
free(commit)