]> source.dussan.org Git - gitblit.git/commitdiff
Respect repository default integration branch for new proposal tickets 35/135/2
authorJames Moger <james.moger@gitblit.com>
Fri, 26 Sep 2014 13:06:29 +0000 (09:06 -0400)
committerJames Moger <james.moger@gitblit.com>
Fri, 26 Sep 2014 13:06:29 +0000 (09:06 -0400)
src/main/java/com/gitblit/git/PatchsetReceivePack.java

index d9404cb4d86f2bf221e28e3431007eee7b15f177..54ffb7baffe5b21cffd8eee39f705ed2143b125f 100644 (file)
@@ -151,6 +151,11 @@ public class PatchsetReceivePack extends GitblitReceivePack {
                        LOGGER.error("failed to determine default branch for " + repository.name, e);\r
                }\r
 \r
+               if (!StringUtils.isEmpty(getRepositoryModel().mergeTo)) {\r
+                       // repository settings specifies a default integration branch\r
+                       defaultBranch = Repository.shortenRefName(getRepositoryModel().mergeTo);\r
+               }\r
+\r
                long ticketId = 0L;\r
                try {\r
                        ticketId = Long.parseLong(branch);\r