Do not incrementally index blobs in submodules (issue-119)
| | |
| | |
|
| | | #### fixes
|
| | |
|
| | | - Do not index blobs in submodules (issue 119)
|
| | | - Restore original user or team object on failure to update (issue 118)
|
| | | - Repository URL uses `X-Forwarded-Proto` and `X-Forwarded-Port`, if available, for reverse proxy configurations (issue 115)
|
| | | - Fixes to relative path determination in repository searh algorithm for symlinks (issue 116)
|
| | |
| | |
|
| | | Map<String, ObjectId> paths = new TreeMap<String, ObjectId>();
|
| | | while (treeWalk.next()) {
|
| | | // ensure path is not in a submodule
|
| | | if (treeWalk.getFileMode(0) != FileMode.GITLINK) {
|
| | | paths.put(treeWalk.getPathString(), treeWalk.getObjectId(0));
|
| | | }
|
| | |
| | | // read the blob content
|
| | | String str = JGitUtils.getStringContent(repository, commit.getTree(),
|
| | | path.path, encodings);
|
| | | if (str != null) {
|
| | | doc.add(new Field(FIELD_CONTENT, str, Store.YES, Index.ANALYZED));
|
| | | writer.addDocument(doc);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | writer.commit();
|
| | |
|
| | | // get any annotated commit tags
|
| | |
| | | }
|
| | | ObjectId entid = tw.getObjectId(0);
|
| | | FileMode entmode = tw.getFileMode(0);
|
| | | if (entmode != FileMode.GITLINK) {
|
| | | RevObject ro = rw.lookupAny(entid, entmode.getObjectType());
|
| | | rw.parseBody(ro);
|
| | | ByteArrayOutputStream os = new ByteArrayOutputStream();
|
| | |
| | | in.close();
|
| | | content = os.toByteArray();
|
| | | }
|
| | | }
|
| | | } catch (Throwable t) {
|
| | | error(t, repository, "{0} can't find {1} in tree {2}", path, tree.name());
|
| | | } finally {
|