From: James Moger Date: Wed, 17 Sep 2014 20:05:42 +0000 (-0400) Subject: Fix bug in migrating to BranchTicketService X-Git-Tag: v1.6.1~28^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ab9c0ce1bbd67dbb1236312123a3e24a74e097c6;p=gitblit.git Fix bug in migrating to BranchTicketService --- diff --git a/src/main/java/com/gitblit/tickets/BranchTicketService.java b/src/main/java/com/gitblit/tickets/BranchTicketService.java index 8c000550..5a42c6a7 100644 --- a/src/main/java/com/gitblit/tickets/BranchTicketService.java +++ b/src/main/java/com/gitblit/tickets/BranchTicketService.java @@ -823,8 +823,12 @@ public class BranchTicketService extends ITicketService implements RefsChangedLi List list = new ArrayList(); TreeWalk tw = null; try { - tw = new TreeWalk(db); ObjectId treeId = db.resolve(BRANCH + "^{tree}"); + if (treeId == null) { + // branch does not exist yet, could be migrating tickets + return list; + } + tw = new TreeWalk(db); int hIdx = tw.addTree(treeId); tw.setRecursive(true);