@@ -28,6 +28,13 @@ reference_wrapper repository_wrapper::head() const
2828 return reference_wrapper (ref);
2929}
3030
31+ reference_wrapper repository_wrapper::find_reference (std::string_view ref_name) const
32+ {
33+ git_reference* ref;
34+ throwIfError (git_reference_lookup (&ref, *this , ref_name.data ()));
35+ return reference_wrapper (ref);
36+ }
37+
3138index_wrapper repository_wrapper::make_index ()
3239{
3340 index_wrapper index = index_wrapper::init (*this );
@@ -46,7 +53,7 @@ branch_wrapper repository_wrapper::create_branch(std::string_view name, const co
4653 return branch_wrapper (branch);
4754}
4855
49- branch_wrapper repository_wrapper::find_branch (std::string_view name)
56+ branch_wrapper repository_wrapper::find_branch (std::string_view name) const
5057{
5158 git_reference* branch = nullptr ;
5259 throwIfError (git_branch_lookup (&branch, *this , name.data (), GIT_BRANCH_LOCAL));
@@ -74,3 +81,10 @@ commit_wrapper repository_wrapper::find_commit(const git_oid& id) const
7481 throwIfError (git_commit_lookup (&commit, *this , &id));
7582 return commit_wrapper (commit);
7683}
84+
85+ annotated_commit_wrapper repository_wrapper::find_annotated_commit (const git_oid& id) const
86+ {
87+ git_annotated_commit* commit;
88+ throwIfError (git_annotated_commit_lookup (&commit, *this , &id));
89+ return annotated_commit_wrapper (commit);
90+ }
0 commit comments