From a02998032e7077e3e744d5725485023097bf30f0 Mon Sep 17 00:00:00 2001 From: Peter Allin Date: Tue, 7 Aug 2012 13:00:07 +0200 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 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/com/gitblit/LuceneExecutor.java b/src/com/gitblit/LuceneExecutor.java index 6c5a60d2..eafb5168 100644 --- a/src/com/gitblit/LuceneExecutor.java +++ b/src/com/gitblit/LuceneExecutor.java @@ -69,6 +69,7 @@ import org.apache.lucene.store.FSDirectory; 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 @@ public class LuceneExecutor implements Runnable { Map paths = new TreeMap(); 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(); -- 2.39.5