@@ -50,7 +50,6 @@ function Base.show(io::IO, c::GitCommit)
50
50
print (io, " Git Commit:\n Commit Author: $authstr \n Committer: $cmtrstr \n SHA: $(GitHash (c)) \n Message:\n $(message (c)) " )
51
51
end
52
52
53
- """ Wrapper around `git_commit_create` """
54
53
function commit (repo:: GitRepo ,
55
54
refname:: AbstractString ,
56
55
msg:: AbstractString ,
@@ -73,7 +72,25 @@ function commit(repo::GitRepo,
73
72
return commit_id_ptr[]
74
73
end
75
74
76
- """ Commit changes to repository"""
75
+ """
76
+ commit(repo::GitRepo, msg::AbstractString; kwargs...) -> GitHash
77
+
78
+ Wrapper around [`git_commit_create`](https://libgit2.github.com/libgit2/#HEAD/group/commit/git_commit_create).
79
+ Create a commit in the repository `repo`. `msg` is the commit message. Return the OID of the new commit.
80
+
81
+ The keyword arguments are:
82
+ * `refname::AbstractString=Consts.HEAD_FILE`: if not NULL, the name of the reference to update to point to
83
+ the new commit. For example, `"HEAD"` will update the HEAD of the current branch. If the reference does
84
+ not yet exist, it will be created.
85
+ * `author::Signature = Signature(repo)` is a `Signature` containing information about the person who authored the commit.
86
+ * `committer::Signature = Signature(repo)` is a `Signature` containing information about the person who commited the commit to
87
+ the repository. Not necessarily the same as `author`, for instance if `author` emailed a patch to
88
+ `committer` who committed it.
89
+ * `tree_id::GitHash = GitHash()` is a git tree to use to create the commit, showing its ancestry and relationship with
90
+ any other history. `tree` must belong to `repo`.
91
+ * `parent_ids::Vector{GitHash}=GitHash[]` is a list of commits by [`GitHash`](@ref) to use as parent
92
+ commits for the new one, and may be empty. A commit might have multiple parents if it is a merge commit, for example.
93
+ """
77
94
function commit (repo:: GitRepo , msg:: AbstractString ;
78
95
refname:: AbstractString = Consts. HEAD_FILE,
79
96
author:: Signature = Signature (repo),
0 commit comments