summaryrefslogtreecommitdiffstats
path: root/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/gitblit/tickets/BranchTicketService.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/com/gitblit/tickets/BranchTicketService.java b/src/main/java/com/gitblit/tickets/BranchTicketService.java
index 8a2bc951..42189bfd 100644
--- a/src/main/java/com/gitblit/tickets/BranchTicketService.java
+++ b/src/main/java/com/gitblit/tickets/BranchTicketService.java
@@ -828,8 +828,12 @@ public class BranchTicketService extends ITicketService implements RefsChangedLi
List<DirCacheEntry> list = new ArrayList<DirCacheEntry>();
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);