From a02998032e7077e3e744d5725485023097bf30f0 Mon Sep 17 00:00:00 2001 From: Peter Allin <peter@peca.dk> Date: Tue, 07 Aug 2012 07:00:07 -0400 Subject: [PATCH] Don't try to index git submodules, they are seperate repositories and should be handled seperately. --- src/com/gitblit/LuceneExecutor.java | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/com/gitblit/LuceneExecutor.java b/src/com/gitblit/LuceneExecutor.java index 6c5a60d..eafb516 100644 --- a/src/com/gitblit/LuceneExecutor.java +++ b/src/com/gitblit/LuceneExecutor.java @@ -69,6 +69,7 @@ import org.apache.lucene.util.Version; import org.eclipse.jgit.diff.DiffEntry.ChangeType; import org.eclipse.jgit.lib.Constants; +import org.eclipse.jgit.lib.FileMode; import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.ObjectLoader; import org.eclipse.jgit.lib.ObjectReader; @@ -493,7 +494,9 @@ Map<String, ObjectId> paths = new TreeMap<String, ObjectId>(); while (treeWalk.next()) { - paths.put(treeWalk.getPathString(), treeWalk.getObjectId(0)); + if (treeWalk.getFileMode(0) != FileMode.GITLINK) { + paths.put(treeWalk.getPathString(), treeWalk.getObjectId(0)); + } } ByteArrayOutputStream os = new ByteArrayOutputStream(); -- Gitblit v1.9.1