當前位置: 首頁>>代碼示例 >>用法及示例精選 >>正文


Julia LibGit2.authors用法及代碼示例


用法:

authors(repo::GitRepo) -> Vector{Signature}

將提交的所有作者返回到 repo 存儲庫。

例子

repo = LibGit2.GitRepo(repo_path)
repo_file = open(joinpath(repo_path, test_file), "a")

println(repo_file, commit_msg)
flush(repo_file)
LibGit2.add!(repo, test_file)
sig = LibGit2.Signature("TEST", "TEST@TEST.COM", round(time(), 0), 0)
commit_oid1 = LibGit2.commit(repo, "commit1"; author=sig, committer=sig)
println(repo_file, randstring(10))
flush(repo_file)
LibGit2.add!(repo, test_file)
commit_oid2 = LibGit2.commit(repo, "commit2"; author=sig, committer=sig)

# will be a Vector of [sig, sig]
auths = LibGit2.authors(repo)

相關用法


注:本文由純淨天空篩選整理自julialang.org 大神的英文原創作品 LibGit2.authors — Function。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。