aboutsummaryrefslogtreecommitdiff
path: root/http_handle_repo_contrib_one.go
diff options
context:
space:
mode:
Diffstat (limited to 'http_handle_repo_contrib_one.go')
-rw-r--r--http_handle_repo_contrib_one.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/http_handle_repo_contrib_one.go b/http_handle_repo_contrib_one.go
index 134f50b..0df2e45 100644
--- a/http_handle_repo_contrib_one.go
+++ b/http_handle_repo_contrib_one.go
@@ -72,6 +72,13 @@ func httpHandleRepoContribOne(writer http.ResponseWriter, request *http.Request,
errorPage500(writer, params, "Error getting merge base: "+err.Error())
return
}
+
+ if len(mergeBases) < 1 {
+ errorPage500(writer, params, "No merge base found for this merge request; these two branches do not share any common history")
+ // TODO
+ return
+ }
+
mergeBaseCommit = mergeBases[0]
params["merge_base"] = mergeBaseCommit