summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeah (ctucx) <leah@ctu.cx>2021-03-18 01:37:21 +0100
committerLeah (ctucx) <leah@ctu.cx>2021-03-18 01:37:21 +0100
commitac7f5641f8cfb1d66d48d8388828f9e1f73d2714 (patch)
tree29e29ac3782a9c53d916e15e5dc664f66934b099
parente17f48f3c8eb517d74f8fe2b360d4e8646d16454 (diff)
downloadnimgit-ac7f5641f8cfb1d66d48d8388828f9e1f73d2714.tar.gz
nimgit-ac7f5641f8cfb1d66d48d8388828f9e1f73d2714.tar.bz2
nimgit-ac7f5641f8cfb1d66d48d8388828f9e1f73d2714.zip
treeEntry.nim: new proc modeStr
-rw-r--r--nimgit/treeEntry.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/nimgit/treeEntry.nim b/nimgit/treeEntry.nim
index 8dd30e2..a0a6c4c 100644
--- a/nimgit/treeEntry.nim
+++ b/nimgit/treeEntry.nim
@@ -9,6 +9,8 @@ proc name* (entry: GitTreeEntry): string = $git_tree_entry_name(entry)
proc mode* (entry: GitTreeEntry): int = cast[int](git_tree_entry_filemode(entry))
+proc modeStr* (entry: GitTreeEntry): string = filemodeStr(entry.mode)
+
proc getObject* (repo: GitRepository, entry: GitTreeEntry): GitObject =
let error = git_tree_entry_to_object(addr result, repo, entry)