summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeah (ctucx) <leah@ctu.cx>2021-03-18 20:36:37 +0100
committerLeah (ctucx) <leah@ctu.cx>2021-03-18 20:36:37 +0100
commit19b970dcb5cb1df3d96f23f020bea7ce5cb732fc (patch)
tree0d1d7326b7295f321fcfebb57e5983ab685e7ee1
parent13c01f777129124dcad3b40fab81b84b0d5008bc (diff)
downloadnimgit-19b970dcb5cb1df3d96f23f020bea7ce5cb732fc.tar.gz
nimgit-19b970dcb5cb1df3d96f23f020bea7ce5cb732fc.tar.bz2
nimgit-19b970dcb5cb1df3d96f23f020bea7ce5cb732fc.zip
utils.nim: fill string always with 10 -
-rw-r--r--nimgit.nimble1
-rw-r--r--nimgit/utils.nim2
2 files changed, 1 insertions, 2 deletions
diff --git a/nimgit.nimble b/nimgit.nimble
index 709bf13..bf377e7 100644
--- 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
index 4a133e7..5800027 100644
--- 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'