diff options
Diffstat (limited to 'nimgit')
-rw-r--r-- | nimgit/repository.nim | 11 |
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 |