ctucx.git: nimgit

nim-wrapper for libgit2

commit e0cc20f7f582d999775ad84ec968a269de532cff
parent b8cb5804a1c271f1e3615649ca699c5b4d2367ac
Author: Leah (ctucx) <leah@ctu.cx>
Date: Wed, 17 Mar 2021 11:35:19 +0100

repository.nim: rename procs
1 file changed, 7 insertions(+), 6 deletions(-)
M
nimgit/repository.nim
|
13
+++++++------
diff --git a/nimgit/repository.nim b/nimgit/repository.nim
@@ -19,7 +19,7 @@ proc getHeadForWorktree* (repo: GitRepository, name: string): GitReference =
         free(result)
         raise newException(CatchableError, "Cannot get HEAD for worktree: " & $error.getResultCode)
 
-proc getHead* (repo: GitRepository): GitReference = 
+proc head* (repo: GitRepository): GitReference = 
     let error = git_repository_head(addr result, repo)
 
     if error != 0:

@@ -28,8 +28,9 @@ proc getHead* (repo: GitRepository): GitReference =
 
 proc isHeadDetached* (repo: GitRepository): bool = cast[bool](git_repository_head_detached(repo))
 
+proc isHeadUnborn* (repo: GitRepository): bool = cast[bool](git_repository_head_unborn(repo))
 
-proc getTagList* (repo: GitRepository): seq[string] =
+proc tagList* (repo: GitRepository): seq[string] =
     var list: git_strarray
     
     let error = git_tag_list(addr list, repo)

@@ -52,8 +53,8 @@ proc isWorktree* (repo: GitRepository): bool = cast[bool](git_repository_is_work
 
 proc isBare* (repo: GitRepository): bool = cast[bool](git_repository_is_bare(repo))
 
-proc getPath* (repo: GitRepository): string = $git_repository_path(repo)
+proc path* (repo: GitRepository): string = $git_repository_path(repo)
 
-proc getWorkdir* (repo: GitRepository): string = $git_repository_workdir(repo)
+proc workdir* (repo: GitRepository): string = $git_repository_workdir(repo)
 
-proc `$`* (repo: GitRepository): string = repo.getPath()-
\ No newline at end of file
+proc `$`* (repo: GitRepository): string = repo.path()+
\ No newline at end of file