summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeah (ctucx) <leah@ctu.cx>2021-03-17 02:23:42 +0100
committerLeah (ctucx) <leah@ctu.cx>2021-03-17 02:23:42 +0100
commit1e0f00b7546d535d96a0126f9840424a02878486 (patch)
treef82e7a8533487abf9abdacfc89868d1c7e8aece2
parent2c5ccc3dc6a01b7b90212f60bd70faf6d2271b39 (diff)
downloadnimgit-1e0f00b7546d535d96a0126f9840424a02878486.tar.gz
nimgit-1e0f00b7546d535d96a0126f9840424a02878486.tar.bz2
nimgit-1e0f00b7546d535d96a0126f9840424a02878486.zip
add new types
-rw-r--r--nimgit/types.nim14
1 files changed, 14 insertions, 0 deletions
diff --git a/nimgit/types.nim b/nimgit/types.nim
index 6372394..0ddfd75 100644
--- a/nimgit/types.nim
+++ b/nimgit/types.nim
@@ -6,9 +6,23 @@ type
GitObject* = ptr git_object
GitObjectId* = ptr git_oid
GitCommit* = ptr git_commit
+ GitTree* = ptr git_tree
GitReference* = ptr git_reference
GitRevisionWalker* = ptr git_revwalk
GitBranchIterator* = ptr git_branch_iterator
+
+ GitObjectKind* = enum
+ # we have to add 2 here to satisfy nim; discriminants.low must be zero
+ goAny = (2 + GIT_OBJECT_ANY, "object") # -2
+ goInvalid = (2 + GIT_OBJECT_INVALID, "invalid") # -1
+ # this space intentionally left blank
+ goCommit = (2 + GIT_OBJECT_COMMIT, "commit") # 1
+ goTree = (2 + GIT_OBJECT_TREE, "tree") # 2
+ goBlob = (2 + GIT_OBJECT_BLOB, "blob") # 3
+ goTag = (2 + GIT_OBJECT_TAG, "tag") # 4
+ # this space intentionally left blank
+ goOfsDelta = (2 + GIT_OBJECT_OFS_DELTA, "ofs") # 6
+ goRefDelta = (2 + GIT_OBJECT_REF_DELTA, "ref") # 7
GitTime* = object
time* : Time