From 80492711b4588c10dffa93a57fd9926dc337bbae Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Wed, 5 Mar 2025 10:05:04 +0800 Subject: *: Typing fixes --- http_handle_repo_contrib_one.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 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 91acfea..9810d5d 100644 --- a/http_handle_repo_contrib_one.go +++ b/http_handle_repo_contrib_one.go @@ -55,11 +55,12 @@ func handle_repo_contrib_one(w http.ResponseWriter, r *http.Request, params map[ destination_branch_hash, err = get_ref_hash_from_type_and_name(repo, "", "") } else { destination_branch_hash, err = get_ref_hash_from_type_and_name(repo, "branch", destination_branch) - if err != nil { - http.Error(w, "Error getting destination branch hash: "+err.Error(), http.StatusInternalServerError) - return - } } + if err != nil { + http.Error(w, "Error getting destination branch hash: "+err.Error(), http.StatusInternalServerError) + return + } + destination_commit, err := repo.CommitObject(destination_branch_hash) if err != nil { http.Error(w, "Error getting destination commit: "+err.Error(), http.StatusInternalServerError) -- cgit v1.2.3