]> source.dussan.org Git - gitblit.git/commitdiff
Don't try to index git submodules, they are seperate repositories and should be handl...
authorPeter Allin <peter@peca.dk>
Tue, 7 Aug 2012 11:00:07 +0000 (13:00 +0200)
committerPeter Allin <peter@peca.dk>
Tue, 7 Aug 2012 11:00:07 +0000 (13:00 +0200)
src/com/gitblit/LuceneExecutor.java

index 6c5a60d2dc377422b9afe1c82e52d88b73aae36d..eafb5168ceeaef644e324a3270c9dba71e2ba636 100644 (file)
@@ -69,6 +69,7 @@ import org.apache.lucene.store.FSDirectory;
 import org.apache.lucene.util.Version;\r
 import org.eclipse.jgit.diff.DiffEntry.ChangeType;\r
 import org.eclipse.jgit.lib.Constants;\r
+import org.eclipse.jgit.lib.FileMode;\r
 import org.eclipse.jgit.lib.ObjectId;\r
 import org.eclipse.jgit.lib.ObjectLoader;\r
 import org.eclipse.jgit.lib.ObjectReader;\r
@@ -493,7 +494,9 @@ public class LuceneExecutor implements Runnable {
                                \r
                                Map<String, ObjectId> paths = new TreeMap<String, ObjectId>();\r
                                while (treeWalk.next()) {\r
-                                       paths.put(treeWalk.getPathString(), treeWalk.getObjectId(0));\r
+                                       if (treeWalk.getFileMode(0) != FileMode.GITLINK) {\r
+                                               paths.put(treeWalk.getPathString(), treeWalk.getObjectId(0));\r
+                                       }\r
                                }                               \r
 \r
                                ByteArrayOutputStream os = new ByteArrayOutputStream();\r