summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeah (ctucx) <leah@ctu.cx>2021-03-17 11:35:19 +0100
committerLeah (ctucx) <leah@ctu.cx>2021-03-17 11:35:19 +0100
commite0cc20f7f582d999775ad84ec968a269de532cff (patch)
tree58e3a80b3086f332068c60f894423b57454a5172
parentb8cb5804a1c271f1e3615649ca699c5b4d2367ac (diff)
downloadnimgit-e0cc20f7f582d999775ad84ec968a269de532cff.tar.gz
nimgit-e0cc20f7f582d999775ad84ec968a269de532cff.tar.bz2
nimgit-e0cc20f7f582d999775ad84ec968a269de532cff.zip
repository.nim: rename procs
-rw-r--r--nimgit/repository.nim11
1 files changed, 6 insertions, 5 deletions
diff --git a/nimgit/repository.nim b/nimgit/repository.nim
index 18460b1..6dfb178 100644
--- 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