ctucx.git: nimgit

[nimlang] nim-wrapper for libgit2

commit 19b970dcb5cb1df3d96f23f020bea7ce5cb732fc
parent 13c01f777129124dcad3b40fab81b84b0d5008bc
Author: Leah (ctucx) <leah@ctu.cx>
Date: Thu, 18 Mar 2021 20:36:37 +0100

utils.nim: fill string always with 10 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/nimgit.nimble b/nimgit.nimble
@@ -11,6 +11,5 @@ bin           = @["showLastCommit", "listAllCommits", "listAllRefs", "listAllBra
 
 
 # Dependencies
-
 requires "nim >= 1.4.2"
 requires "nimgit2"
diff --git a/nimgit/utils.nim b/nimgit/utils.nim
@@ -18,7 +18,7 @@ proc parseGitSignature* (signature: ptr git_signature): GitSignature =
     result.when  = parseGitTime(signature.when)
 
 proc filemodeStr* (m: int): string =
-  var mode = align("", sizeof(m), '-')
+  var mode = align("", 10, '-')
 
   if S_ISREG(cast[Mode](m)):    mode[0] = '-'
   elif S_ISBLK(cast[Mode](m)):  mode[0] = 'b'