Milos Cubrilo
2015-01-11 a9a2ffcf9a34bd25fe2e05bfdd4cde74725bb17d
src/main/java/com/gitblit/tickets/BranchTicketService.java
@@ -30,9 +30,6 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
import javax.inject.Inject;
import javax.inject.Singleton;
import org.eclipse.jgit.api.errors.ConcurrentRefUpdateException;
import org.eclipse.jgit.api.errors.JGitInternalException;
import org.eclipse.jgit.dircache.DirCache;
@@ -75,6 +72,8 @@
import com.gitblit.utils.ArrayUtils;
import com.gitblit.utils.JGitUtils;
import com.gitblit.utils.StringUtils;
import com.google.inject.Inject;
import com.google.inject.Singleton;
/**
 * Implementation of a ticket service based on an orphan branch.  All tickets
@@ -117,6 +116,7 @@
   @Override
   public BranchTicketService start() {
      log.info("{} started", getClass().getSimpleName());
      return this;
   }
@@ -828,8 +828,12 @@
      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);