#include "../wrapper/commit_wrapper.hpp" commit_wrapper::commit_wrapper(git_commit* commit) : base_type(commit) { } commit_wrapper::~commit_wrapper() { git_commit_free(p_resource); p_resource = nullptr; } commit_wrapper::operator git_object*() const noexcept { return reinterpret_cast(p_resource); } const git_oid& commit_wrapper::oid() const { return *git_commit_id(p_resource); } std::string commit_wrapper::commit_oid_tostr() const { char buf[GIT_OID_SHA1_HEXSIZE + 1]; return git_oid_tostr(buf, sizeof(buf), &this->oid()); }