Cross Reference: get_commit.rb
xref
: /
ontohub
/
lib
/
git_repository
/
get_commit.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
get_commit.rb revision 82943dcc7f878756736a3f21a8100b389b94ba46
module
GitRepository
::
GetCommit
# depends on GitRepository
extend
ActiveSupport
::
Concern
def
get_commit_message
(
commit_oid
=
nil
)
get_commit
(
commit_oid
)
.
message
unless
@
repo.empty
?
end
def
get_commit_author
(
commit_oid
=
nil
)
get_commit
(
commit_oid
)
.
author
unless
@
repo.empty
?
end
def
get_commit_time
(
commit_oid
=
nil
)
get_commit
(
commit_oid
)
.
time
unless
@
repo.empty
?
end
protected
def
get_commit
(
commit_oid
=
nil
)
@
repo.lookup
(
commit_oid
||
head_oid
)
unless
@
repo.empty
?
end
end