James Moger
2012-03-10 9e2f9ddbe46e88c919834940352dcead61ac7a02
src/com/gitblit/utils/LuceneUtils.java
@@ -292,12 +292,13 @@
            TreeWalk treeWalk = new TreeWalk(repository);
            treeWalk.addTree(branchHead.getTree());
            treeWalk.setRecursive(true);
            
            while (treeWalk.next()) {
               result.blobCount++;
               String blobPath = treeWalk.getPathString();
               RevCommit blobRev = branchHead;
               RevWalk blobWalk = null;
               if (fullIndex) {
                  // XXX this is _really_ slow, there must be a better way
@@ -308,11 +309,7 @@
                        PathFilterGroup.createFromStrings(Collections.singleton(blobPath)),
                        TreeFilter.ANY_DIFF);
                  blobWalk.setTreeFilter(filter);
                  for (RevCommit commit : blobWalk) {
                     blobRev = commit;
                     break;
                  }
                  blobRev = blobWalk.next();
               }
               
               String blobAuthor = getAuthor(blobRev);
@@ -321,7 +318,7 @@
                     Resolution.MINUTE);
               
               if (blobWalk != null) {
                  blobWalk.dispose();
                  blobWalk.dispose();
               }
               
               Document doc = new Document();