From 54926a719de46b3c359f2f7ce3c29ff4fe55397b Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Wed, 19 Mar 2025 11:20:24 +0800 Subject: Remove underscores from Go code, pt 3 --- http_handle_repo_contrib_one.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'http_handle_repo_contrib_one.go') diff --git a/http_handle_repo_contrib_one.go b/http_handle_repo_contrib_one.go index f4db20c..cc17a67 100644 --- a/http_handle_repo_contrib_one.go +++ b/http_handle_repo_contrib_one.go @@ -40,7 +40,7 @@ func handle_repo_contrib_one(w http.ResponseWriter, r *http.Request, params map[ repo = params["repo"].(*git.Repository) - if source_ref_hash, err = get_ref_hash_from_type_and_name(repo, "branch", source_ref); err != nil { + if source_ref_hash, err = getRefHash(repo, "branch", source_ref); err != nil { http.Error(w, "Error getting source ref hash: "+err.Error(), http.StatusInternalServerError) return } @@ -53,9 +53,9 @@ func handle_repo_contrib_one(w http.ResponseWriter, r *http.Request, params map[ var destination_branch_hash plumbing.Hash if destination_branch == "" { destination_branch = "HEAD" - destination_branch_hash, err = get_ref_hash_from_type_and_name(repo, "", "") + destination_branch_hash, err = getRefHash(repo, "", "") } else { - destination_branch_hash, err = get_ref_hash_from_type_and_name(repo, "branch", destination_branch) + destination_branch_hash, err = getRefHash(repo, "branch", destination_branch) } if err != nil { http.Error(w, "Error getting destination branch hash: "+err.Error(), http.StatusInternalServerError) -- cgit v1.2.3