summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-09-26 09:06:29 -0400
committerJames Moger <james.moger@gitblit.com>2014-09-26 09:06:29 -0400
commit600d43db0c6c19fafa2f5f313170f31cc82acb9c (patch)
tree4d350b1d2ee142ef1212fd5f76a3f2a2d716d87c
parent6c874ebaa083be47aa59d3bd44fb3492e9f4df8e (diff)
downloadgitblit-600d43db0c6c19fafa2f5f313170f31cc82acb9c.tar.gz
gitblit-600d43db0c6c19fafa2f5f313170f31cc82acb9c.zip
Respect repository default integration branch for new proposal tickets
-rw-r--r--src/main/java/com/gitblit/git/PatchsetReceivePack.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/com/gitblit/git/PatchsetReceivePack.java b/src/main/java/com/gitblit/git/PatchsetReceivePack.java
index d9404cb4..54ffb7ba 100644
--- a/src/main/java/com/gitblit/git/PatchsetReceivePack.java
+++ b/src/main/java/com/gitblit/git/PatchsetReceivePack.java
@@ -151,6 +151,11 @@ public class PatchsetReceivePack extends GitblitReceivePack {
LOGGER.error("failed to determine default branch for " + repository.name, e);
}
+ if (!StringUtils.isEmpty(getRepositoryModel().mergeTo)) {
+ // repository settings specifies a default integration branch
+ defaultBranch = Repository.shortenRefName(getRepositoryModel().mergeTo);
+ }
+
long ticketId = 0L;
try {
ticketId = Long.parseLong(branch);