diff options
Diffstat (limited to 'http_handle_repo_contrib_one.go')
-rw-r--r-- | http_handle_repo_contrib_one.go | 9 |
1 files changed, 5 insertions, 4 deletions
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) |