@@ -53,7 +53,7 @@ void print_time(git_time intime, std::string prefix)
5353 std::cout << prefix << out << " " << sign << std::format (" {:02d}" , hours) << std::format (" {:02d}" , minutes) <<std::endl;
5454}
5555
56- std::vector<std::string> get_tags_for_commit (repository_wrapper& repo, const git_oid* commit_oid)
56+ std::vector<std::string> get_tags_for_commit (repository_wrapper& repo, const git_oid& commit_oid)
5757{
5858 std::vector<std::string> tags;
5959 git_strarray tag_names = {0 };
@@ -71,7 +71,7 @@ std::vector<std::string> get_tags_for_commit(repository_wrapper& repo, const git
7171 reference_wrapper tag_ref = repo.find_reference (ref_name);
7272 object_wrapper peeled = tag_ref.peel <object_wrapper>();
7373
74- if (git_oid_equal (&peeled.oid (), commit_oid))
74+ if (git_oid_equal (&peeled.oid (), & commit_oid))
7575 {
7676 tags.push_back (std::string (tag_name));
7777 }
@@ -107,8 +107,7 @@ std::vector<std::string> get_branches_for_commit(repository_wrapper& repo, git_b
107107
108108 if (branch_target && git_oid_equal (branch_target, &commit_oid))
109109 {
110- std::string branch_name;
111- branch_name = branch->name ();
110+ std::string branch_name (branch->name ());
112111 if (type == GIT_BRANCH_LOCAL)
113112 {
114113 if (branch_name != exclude_branch)
@@ -153,7 +152,7 @@ commit_refs get_refs_for_commit(repository_wrapper& repo, const git_oid& commit_
153152 }
154153 }
155154
156- refs.tags = get_tags_for_commit (repo, & commit_oid);
155+ refs.tags = get_tags_for_commit (repo, commit_oid);
157156 refs.local_branches = get_branches_for_commit (repo, GIT_BRANCH_LOCAL, commit_oid, refs.head_branch );
158157 refs.remote_branches = get_branches_for_commit (repo, GIT_BRANCH_REMOTE, commit_oid, " " );
159158
0 commit comments