diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-19 11:20:24 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-19 11:20:24 +0800 |
commit | 54926a719de46b3c359f2f7ce3c29ff4fe55397b (patch) | |
tree | b81028ae83c949807313a54296bf6d0b59bea8a0 /http_handle_repo_contrib_one.go | |
parent | Remove underscores from Go code, pt 2 (diff) | |
download | forge-54926a719de46b3c359f2f7ce3c29ff4fe55397b.tar.gz forge-54926a719de46b3c359f2f7ce3c29ff4fe55397b.tar.zst forge-54926a719de46b3c359f2f7ce3c29ff4fe55397b.zip |
Remove underscores from Go code, pt 3
Diffstat (limited to 'http_handle_repo_contrib_one.go')
-rw-r--r-- | http_handle_repo_contrib_one.go | 6 |
1 files changed, 3 insertions, 3 deletions
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) |