Allow retrieval of a commit message
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
-module(geef_commit).
|
||||
-export([tree_id/1, tree/1, lookup/2]).
|
||||
-export([create/5, create/6, create/7]).
|
||||
-export([message/1]).
|
||||
|
||||
-include("geef_records.hrl").
|
||||
|
||||
@@ -53,3 +54,7 @@ create(Repo, Person = #geef_signature{}, Message, Tree, Parents, Opts) ->
|
||||
|
||||
create(Repo, Person = #geef_signature{}, Message, Tree, Parents) ->
|
||||
create(Repo, Person, Person, Message, Tree, Parents, []).
|
||||
|
||||
-spec message(commit()) -> {ok, binary()} | {error, term()}.
|
||||
message(#geef_object{type=commit,handle=Handle}) ->
|
||||
geef_nif:commit_message(Handle).
|
||||
|
||||
@@ -115,6 +115,10 @@ commit_tree(_Handle) ->
|
||||
commit_create(_RepoHandle, _Ref, _Author, _Committer, _Encoding, _Message, _Tree, _Parents) ->
|
||||
?NIF_FN.
|
||||
|
||||
-spec commit_message(term) -> binary().
|
||||
commit_message(_CommitHandle) ->
|
||||
?NIF_FN.
|
||||
|
||||
-spec tree_bypath(term, iolist()) -> term().
|
||||
tree_bypath(_TreeHandle, _Path) ->
|
||||
nif_error(?LINE).
|
||||
|
||||
Reference in New Issue
Block a user