Skip to content

The Unified and Autonomous Development Platform

Fix the binary file detection issue.

robin shine404bac350b4f
diff --git a/commons.git/src/main/java/com/pmease/commons/git/Blob.java b/commons.git/src/main/java/com/pmease/commons/git/Blob.java
index 4cb0f38faa..a8de186500 100644
--- a/commons.git/src/main/java/com/pmease/commons/git/Blob.java
+++ b/commons.git/src/main/java/com/pmease/commons/git/Blob.java
@@ -8,9 +8,9 @@ import javax.annotation.Nullable;
import org.apache.tika.mime.MediaType;
+import com.google.common.base.Charsets;
import com.google.common.base.Optional;
-import com.pmease.commons.util.Charsets;
-import com.pmease.commons.util.MediaTypes;
+import com.pmease.commons.util.ContentDetector;
public class Blob {
@@ -55,7 +55,7 @@ public class Blob {
if (ident.isGitLink() || ident.isSymbolLink() || ident.isTree())
mediaType = MediaType.TEXT_PLAIN;
else
- mediaType = MediaTypes.detectFrom(bytes, ident.path);
+ mediaType = ContentDetector.detectMediaType(bytes, ident.path);
}
return mediaType;
}
@@ -73,11 +73,14 @@ public class Blob {
Charset charset = Charsets.UTF_8;
optionalText = Optional.of(new Text(charset, new String(bytes, charset)));
} else if (!isPartial()) {
- Charset charset = Charsets.detectFrom(bytes);
- if (charset != null)
+ if (!ContentDetector.isBinary(bytes, ident.path)) {
+ Charset charset = ContentDetector.detectCharset(bytes);
+ if (charset == null)
+ charset = Charset.defaultCharset();
optionalText = Optional.of(new Text(charset, new String(bytes, charset)));
- else
+ } else {
optionalText = Optional.absent();
+ }
} else {
optionalText = Optional.absent();
}
diff --git a/commons.git/src/main/java/com/pmease/commons/git/BlobText.java b/commons.git/src/main/java/com/pmease/commons/git/BlobText.java
index 5f9634cf61..82bb4ad51b 100644
--- a/commons.git/src/main/java/com/pmease/commons/git/BlobText.java
+++ b/commons.git/src/main/java/com/pmease/commons/git/BlobText.java
@@ -12,12 +12,12 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.tika.mime.MediaType;
import org.eclipse.jgit.lib.FileMode;
+import com.google.common.base.Charsets;
import com.google.common.collect.Lists;
import com.pmease.commons.git.extensionpoint.TextConverter;
import com.pmease.commons.git.extensionpoint.TextConverterProvider;
import com.pmease.commons.loader.AppLoader;
-import com.pmease.commons.util.Charsets;
-import com.pmease.commons.util.MediaTypes;
+import com.pmease.commons.util.ContentDetector;
@SuppressWarnings("serial")
public class BlobText implements Serializable {
@@ -111,7 +111,7 @@ public class BlobText implements Serializable {
if (blobMode == FileMode.TYPE_GITLINK || blobMode == FileMode.TYPE_SYMLINK)
return new BlobText(new String(blobContent));
- MediaType mediaType = MediaTypes.detectFrom(blobContent, blobPath);
+ MediaType mediaType = ContentDetector.detectMediaType(blobContent, blobPath);
for (TextConverterProvider provider: AppLoader.getExtensions(TextConverterProvider.class)) {
TextConverter textConverter = provider.getTextConverter(mediaType);
@@ -119,7 +119,7 @@ public class BlobText implements Serializable {
return new BlobText(textConverter.convert(blobContent), true, Charsets.UTF_8.name(), mediaType);
}
- Charset charset = Charsets.detectFrom(blobContent);
+ Charset charset = ContentDetector.detectCharset(blobContent);
if (charset != null) {
List<String> lines = new ArrayList<>();
StringBuilder builder = new StringBuilder();
diff --git a/commons.util/src/main/java/com/pmease/commons/util/Charsets.java b/commons.util/src/main/java/com/pmease/commons/util/Charsets.java
deleted file mode 100644
index cc99391267..0000000000
--- a/commons.util/src/main/java/com/pmease/commons/util/Charsets.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package com.pmease.commons.util;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.charset.Charset;
-
-import javax.annotation.Nullable;
-
-public class Charsets extends org.apache.commons.io.Charsets {
-
- /**
- * Read leading information of specified stream until the charset is detected.
- *
- * @param contentStream
- * stream to be read for charset detection
- * @return
- * detected charset, or <tt>null</tt> if charset can not be detected or input
- * stream represents binary data
- */
- public static @Nullable Charset detectFrom(InputStream contentStream) {
- try {
- return UniversalEncodingDetector.detect(contentStream);
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- }
-
- /**
- * Read leading information of specified content bytes to detect content charset.
- *
- * @param contentBytes
- * content to be detected
- * @return
- * charset of the content, or <tt>null</tt> if charset can not be detected
- */
- public static @Nullable Charset detectFrom(byte[] contentBytes) {
- if (contentBytes.length != 0) {
- try {
- return UniversalEncodingDetector.detect(contentBytes);
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- } else {
- return Charsets.UTF_8;
- }
- }
-
- public static boolean isBinary(InputStream contentStream) {
- try {
- return UniversalEncodingDetector.isBinary(contentStream);
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- }
-
- public static boolean isBinary(byte[] contentBytes) {
- if (contentBytes.length != 0) {
- try {
- return UniversalEncodingDetector.isBinary(contentBytes);
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- } else {
- return false;
- }
- }
-
-}
diff --git a/commons.util/src/main/java/com/pmease/commons/util/ContentDetector.java b/commons.util/src/main/java/com/pmease/commons/util/ContentDetector.java
new file mode 100644
index 0000000000..b234c37b84
--- /dev/null
+++ b/commons.util/src/main/java/com/pmease/commons/util/ContentDetector.java
@@ -0,0 +1,99 @@
+package com.pmease.commons.util;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.charset.Charset;
+
+import javax.annotation.Nullable;
+
+import org.apache.tika.Tika;
+import org.apache.tika.mime.MediaType;
+
+public class ContentDetector {
+
+ private static final Tika tika = new Tika();
+
+ /**
+ * Read leading information of specified stream until the charset is detected.
+ *
+ * @param contentStream
+ * stream to be read for charset detection
+ * @return
+ * detected charset, or <tt>null</tt> if charset can not be detected
+ */
+ public static @Nullable Charset detectCharset(InputStream contentStream) {
+ try {
+ return UniversalEncodingDetector.detect(contentStream);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Read leading information of specified content bytes to detect content charset.
+ *
+ * @param contentBytes
+ * content to be detected
+ * @return
+ * charset of the content, or <tt>null</tt> if charset can not be detected
+ */
+ public static @Nullable Charset detectCharset(byte[] contentBytes) {
+ if (contentBytes.length != 0) {
+ try {
+ return UniversalEncodingDetector.detect(contentBytes);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ } else {
+ return null;
+ }
+ }
+
+ public static boolean isBinary(byte[] contentBytes, @Nullable String fileName) {
+ MediaType mediaType = detectMediaType(contentBytes, fileName);
+
+ return !mediaType.getType().equalsIgnoreCase("text")
+ && !mediaType.equals(MediaType.APPLICATION_XML)
+ && !mediaType.equals(MediaType.application("json"))
+ && !mediaType.equals(MediaType.application("x-sh"))
+ && !mediaType.equals(MediaType.application("javascript"))
+ && !mediaType.equals("x-httpd-jsp");
+ }
+
+ /**
+ * Get text from specified content bytes, optionally with help of file name.
+ *
+ * @param contentBytes
+ * content bytes to construct text from
+ * @param fileName
+ * file name to help deciding if supplied content bytes represents text
+ * @return
+ * text representation of content bytes, or <tt>null</tt> if content
+ * can not be converted to text
+ */
+ @Nullable
+ public static String convertToText(byte[] contentBytes, @Nullable String fileName) {
+ if (!isBinary(contentBytes, fileName)) {
+ Charset charset = detectCharset(contentBytes);
+ if (charset != null)
+ return new String(contentBytes, charset);
+ else
+ return new String(contentBytes);
+ } else {
+ return null;
+ }
+ }
+
+ public static MediaType detectMediaType(byte[] contentBytes, @Nullable String fileName) {
+ return MediaType.parse(tika.detect(contentBytes, fileName));
+ }
+
+ public static MediaType detectMediaType(InputStream contentStream, @Nullable String fileName) {
+ try {
+ return MediaType.parse(tika.detect(contentStream, fileName));
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+}
diff --git a/commons.util/src/main/java/com/pmease/commons/util/MediaTypes.java b/commons.util/src/main/java/com/pmease/commons/util/MediaTypes.java
deleted file mode 100644
index 028460d7e1..0000000000
--- a/commons.util/src/main/java/com/pmease/commons/util/MediaTypes.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package com.pmease.commons.util;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.charset.Charset;
-
-import javax.annotation.Nullable;
-
-import org.apache.tika.Tika;
-import org.apache.tika.mime.MediaType;
-import org.apache.tika.mime.MimeType;
-
-public class MediaTypes {
-
- private static final Tika tika = new Tika();
-
- private MediaTypes() {}
-
- public static boolean isXML(MediaType mediaType) {
- return MediaType.APPLICATION_XML.equals(mediaType)
- || "text/xml".equals(mediaType.toString())
- || mediaType.getSubtype().endsWith("+xml");
- }
-
- public static boolean isJson(MediaType mediaType) {
- return mediaType.equals(MediaType.application("json"))
- || mediaType.getSubtype().endsWith("json");
- }
-
- public static boolean isText(MediaType mediaType) {
- return mediaType.getType().equalsIgnoreCase("text")
- || isXML(mediaType)
- || isJson(mediaType)
- || mediaType.equals(MediaType.application("x-sh"))
- || mediaType.equals(MediaType.application("javascript"))
- || mediaType.equals("x-httpd-jsp");
- }
-
- public static boolean isImage(MediaType mediaType) {
- return mediaType.getType().equals("image");
- }
-
- public static boolean isSafeInline(MediaType type) {
- return isText(type) || isImage(type);
- }
-
- public static MediaType detectFrom(byte[] contentBytes, @Nullable String fileName) {
- String type = tika.detect(contentBytes, fileName);
- MediaType mediaType;
- if (MimeType.isValid(type))
- mediaType = MediaType.parse(type);
- else
- mediaType = MediaType.OCTET_STREAM;
-
- if (mediaType.equals(MediaType.OCTET_STREAM)) {
- Charset charset = Charsets.detectFrom(contentBytes);
- if (charset != null)
- mediaType = MediaType.TEXT_PLAIN;
- }
-
- return mediaType;
- }
-
- public static MediaType detectFrom(InputStream contentStream, @Nullable String fileName) {
- try {
- String type = tika.detect(contentStream, fileName);
- if (MimeType.isValid(type))
- return MediaType.parse(type);
- else
- return MediaType.OCTET_STREAM;
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- }
-
-}
diff --git a/commons.util/src/main/java/com/pmease/commons/util/UniversalEncodingDetector.java b/commons.util/src/main/java/com/pmease/commons/util/UniversalEncodingDetector.java
index c9506c2c6b..38b6fae1e5 100644
--- a/commons.util/src/main/java/com/pmease/commons/util/UniversalEncodingDetector.java
+++ b/commons.util/src/main/java/com/pmease/commons/util/UniversalEncodingDetector.java
@@ -12,17 +12,12 @@ import org.mozilla.universalchardet.UniversalDetector;
* Copied from tika UniversalEncodingDetector
*
*/
-class UniversalEncodingDetector {
+public class UniversalEncodingDetector {
private static final int BUFSIZE = 1024;
private static final int LOOKAHEAD = 16 * BUFSIZE;
- public static Charset detect(InputStream input)
- throws IOException {
- if (input == null) {
- return null;
- }
-
+ public static Charset detect(InputStream input) throws IOException {
input.mark(LOOKAHEAD);
try {
UniversalEncodingListener listener =
diff --git a/gitplex.product/src/test/java/gitplex/product/Test.java b/gitplex.product/src/test/java/gitplex/product/Test.java
index 2d1ee8f395..b10dd53b80 100644
--- a/gitplex.product/src/test/java/gitplex/product/Test.java
+++ b/gitplex.product/src/test/java/gitplex/product/Test.java
@@ -2,18 +2,10 @@ package gitplex.product;
import java.io.IOException;
-import org.eclipse.jgit.api.errors.GitAPIException;
-import org.eclipse.jgit.api.errors.NoHeadException;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.pmease.commons.lang.TokenPosition;
-
public class Test {
@org.junit.Test
- public void test() throws IOException, NoHeadException, GitAPIException {
- TokenPosition hightlight = new TokenPosition(10, null);
- System.out.println(new ObjectMapper().writeValueAsString(hightlight));
+ public void test() throws IOException {
}
}
\ No newline at end of file
diff --git a/gitplex.search/src/main/java/com/pmease/gitplex/search/DefaultIndexManager.java b/gitplex.search/src/main/java/com/pmease/gitplex/search/DefaultIndexManager.java
index 642a5ce7d7..95ec4d9d23 100644
--- a/gitplex.search/src/main/java/com/pmease/gitplex/search/DefaultIndexManager.java
+++ b/gitplex.search/src/main/java/com/pmease/gitplex/search/DefaultIndexManager.java
@@ -1,12 +1,23 @@
package com.pmease.gitplex.search;
-import static com.pmease.gitplex.search.FieldConstants.*;
+import static com.pmease.gitplex.search.FieldConstants.BLOB_HASH;
+import static com.pmease.gitplex.search.FieldConstants.BLOB_INDEX_VERSION;
+import static com.pmease.gitplex.search.FieldConstants.BLOB_NAME;
+import static com.pmease.gitplex.search.FieldConstants.BLOB_PATH;
+import static com.pmease.gitplex.search.FieldConstants.BLOB_PRIMARY_SYMBOLS;
+import static com.pmease.gitplex.search.FieldConstants.BLOB_SECONDARY_SYMBOLS;
+import static com.pmease.gitplex.search.FieldConstants.BLOB_TEXT;
+import static com.pmease.gitplex.search.FieldConstants.COMMIT_HASH;
+import static com.pmease.gitplex.search.FieldConstants.COMMIT_INDEX_VERSION;
+import static com.pmease.gitplex.search.FieldConstants.LAST_COMMIT;
+import static com.pmease.gitplex.search.FieldConstants.LAST_COMMIT_HASH;
+import static com.pmease.gitplex.search.FieldConstants.LAST_COMMIT_INDEX_VERSION;
+import static com.pmease.gitplex.search.FieldConstants.META;
import static com.pmease.gitplex.search.IndexConstants.MAX_INDEXABLE_SIZE;
import static com.pmease.gitplex.search.IndexConstants.NGRAM_SIZE;
import java.io.File;
import java.io.IOException;
-import java.nio.charset.Charset;
import java.util.Set;
import java.util.concurrent.Callable;
import java.util.concurrent.atomic.AtomicReference;
@@ -50,7 +61,7 @@ import com.pmease.commons.lang.ExtractException;
import com.pmease.commons.lang.Extractor;
import com.pmease.commons.lang.Extractors;
import com.pmease.commons.lang.Symbol;
-import com.pmease.commons.util.Charsets;
+import com.pmease.commons.util.ContentDetector;
import com.pmease.commons.util.FileUtils;
import com.pmease.commons.util.LockUtils;
import com.pmease.gitplex.core.manager.IndexResult;
@@ -229,9 +240,8 @@ public class DefaultIndexManager implements IndexManager {
ObjectLoader objectLoader = repo.open(blobId);
if (objectLoader.getSize() <= MAX_INDEXABLE_SIZE) {
byte[] bytes = objectLoader.getCachedBytes();
- Charset charset = Charsets.detectFrom(bytes);
- if (charset != null) {
- String content = new String(bytes, charset);
+ String content = ContentDetector.convertToText(bytes, blobName);
+ if (content != null) {
document.add(new TextField(BLOB_TEXT.name(), content, Store.NO));
if (extractor != null) {
diff --git a/gitplex.search/src/main/java/com/pmease/gitplex/search/query/SymbolQuery.java b/gitplex.search/src/main/java/com/pmease/gitplex/search/query/SymbolQuery.java
index ad353c4c67..ab2af35c52 100644
--- a/gitplex.search/src/main/java/com/pmease/gitplex/search/query/SymbolQuery.java
+++ b/gitplex.search/src/main/java/com/pmease/gitplex/search/query/SymbolQuery.java
@@ -6,7 +6,6 @@ import static com.pmease.gitplex.search.FieldConstants.BLOB_SECONDARY_SYMBOLS;
import static com.pmease.gitplex.search.IndexConstants.MAX_INDEXABLE_SIZE;
import java.io.IOException;
-import java.nio.charset.Charset;
import java.util.List;
import javax.annotation.Nullable;
@@ -26,7 +25,7 @@ import com.pmease.commons.lang.ExtractException;
import com.pmease.commons.lang.Extractor;
import com.pmease.commons.lang.Extractors;
import com.pmease.commons.lang.Symbol;
-import com.pmease.commons.util.Charsets;
+import com.pmease.commons.util.ContentDetector;
import com.pmease.commons.util.pattern.WildcardUtils;
import com.pmease.gitplex.core.GitPlex;
import com.pmease.gitplex.search.hit.QueryHit;
@@ -68,9 +67,8 @@ public class SymbolQuery extends BlobQuery {
objectLoader = treeWalk.getObjectReader().open(treeWalk.getObjectId(0));
if (objectLoader.getSize() <= MAX_INDEXABLE_SIZE) {
byte[] bytes = objectLoader.getCachedBytes();
- Charset charset = Charsets.detectFrom(bytes);
- if (charset != null) {
- String content = new String(bytes, charset);
+ String content = ContentDetector.convertToText(bytes, blobPath);
+ if (content != null) {
try {
for (Symbol symbol: extractor.extract(content)) {
if (hits.size() < getCount()) {
diff --git a/gitplex.search/src/main/java/com/pmease/gitplex/search/query/TextQuery.java b/gitplex.search/src/main/java/com/pmease/gitplex/search/query/TextQuery.java
index dac53c0741..b23aaf8aaf 100644
--- a/gitplex.search/src/main/java/com/pmease/gitplex/search/query/TextQuery.java
+++ b/gitplex.search/src/main/java/com/pmease/gitplex/search/query/TextQuery.java
@@ -5,7 +5,6 @@ import static com.pmease.gitplex.search.FieldConstants.BLOB_TEXT;
import static com.pmease.gitplex.search.IndexConstants.NGRAM_SIZE;
import java.io.IOException;
-import java.nio.charset.Charset;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -24,7 +23,7 @@ import org.eclipse.jgit.treewalk.TreeWalk;
import com.google.common.base.CharMatcher;
import com.google.common.base.Splitter;
import com.pmease.commons.lang.TokenPosition;
-import com.pmease.commons.util.Charsets;
+import com.pmease.commons.util.ContentDetector;
import com.pmease.gitplex.search.IndexConstants;
import com.pmease.gitplex.search.hit.QueryHit;
import com.pmease.gitplex.search.hit.TextHit;
@@ -88,12 +87,9 @@ public class TextQuery extends BlobQuery {
try {
objectLoader = treeWalk.getObjectReader().open(treeWalk.getObjectId(0));
if (objectLoader.getSize() <= IndexConstants.MAX_INDEXABLE_SIZE) {
- byte[] bytes = objectLoader.getCachedBytes();
- Charset charset = Charsets.detectFrom(bytes);
- if (charset != null) {
- String blobPath = treeWalk.getPathString();
- String content = new String(bytes, charset);
-
+ String blobPath = treeWalk.getPathString();
+ String content = ContentDetector.convertToText(objectLoader.getCachedBytes(), blobPath);
+ if (content != null) {
Pattern pattern = getPattern();
if (pattern != null) {
int lineNo = 0;
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/blobsearch/advanced/AdvancedSearchPanel.html b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/blobsearch/advanced/AdvancedSearchPanel.html
index 7e276cae46..6642fc2c5a 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/blobsearch/advanced/AdvancedSearchPanel.html
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/blobsearch/advanced/AdvancedSearchPanel.html
@@ -30,7 +30,7 @@
</div>
<wicket:enclosure child="insideCurrentDir">
<div class="form-group">
- <label class="checkbox-inline"><input wicket:id="insideCurrentDir" type="checkbox"></input> Search inside current directory and sub directories</label>
+ <label class="checkbox-inline"><input wicket:id="insideCurrentDir" type="checkbox"></input> Search inside current tree</label>
</div>
</wicket:enclosure>
</wicket:fragment>
@@ -46,7 +46,7 @@
</div>
<wicket:enclosure child="insideCurrentDir">
<div class="form-group">
- <label class="checkbox-inline"><input wicket:id="insideCurrentDir" type="checkbox"></input> Search inside current directory and sub directories</label>
+ <label class="checkbox-inline"><input wicket:id="insideCurrentDir" type="checkbox"></input> Search inside current tree</label>
</div>
</wicket:enclosure>
</wicket:fragment>
@@ -67,7 +67,7 @@
</div>
<wicket:enclosure child="insideCurrentDir">
<div class="form-group">
- <label class="checkbox-inline"><input wicket:id="insideCurrentDir" type="checkbox"></input> Search inside current directory and sub directories</label>
+ <label class="checkbox-inline"><input wicket:id="insideCurrentDir" type="checkbox"></input> Search inside current tree</label>
</div>
</wicket:enclosure>
</wicket:fragment>
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/diff/BlobDiffPanel.java b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/diff/BlobDiffPanel.java
index c501b10a67..aeaf138cef 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/diff/BlobDiffPanel.java
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/diff/BlobDiffPanel.java
@@ -8,7 +8,7 @@ import org.eclipse.jgit.lib.FileMode;
import com.pmease.commons.git.BlobText;
import com.pmease.commons.git.Change;
-import com.pmease.commons.util.MediaTypes;
+import com.pmease.commons.util.ContentDetector;
import com.pmease.gitplex.core.GitPlex;
import com.pmease.gitplex.core.comment.InlineCommentSupport;
import com.pmease.gitplex.core.model.Repository;
@@ -48,7 +48,7 @@ public class BlobDiffPanel extends Panel {
oldMediaType = MediaType.TEXT_PLAIN;
} else if (oldBlobType == FileMode.TYPE_FILE) {
byte[] oldContent = repoModel.getObject().getBlob(change.getOldBlobInfo()).getBytes();
- oldMediaType = MediaTypes.detectFrom(oldContent, change.getOldPath());
+ oldMediaType = ContentDetector.detectMediaType(oldContent, change.getOldPath());
} else {
oldMediaType = null;
}
@@ -57,7 +57,7 @@ public class BlobDiffPanel extends Panel {
newMediaType = MediaType.TEXT_PLAIN;
} else if (newBlobType == FileMode.TYPE_FILE) {
byte[] newContent = repoModel.getObject().getBlob(change.getNewBlobInfo()).getBytes();
- newMediaType = MediaTypes.detectFrom(newContent, change.getNewPath());
+ newMediaType = ContentDetector.detectMediaType(newContent, change.getNewPath());
} else {
newMediaType = null;
}
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/layout/layout.css b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/layout/layout.css
index bf28f83d5c..10cc14c82e 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/layout/layout.css
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/layout/layout.css
@@ -117,6 +117,8 @@ html, body {
font-weight: bold;
}
#main>.foot {
+ background: #303845;
+ color: #BBB;
font-size: 11px;
margin: 0 -15px;
padding: 8px;
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/file/RepoFilePage.html b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/file/RepoFilePage.html
index 0b42a23cb0..38f0b74edd 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/file/RepoFilePage.html
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/repository/file/RepoFilePage.html
@@ -12,7 +12,7 @@
</div>
<div wicket:id="revisionIndexing" class="revision-indexing">
<img wicket:id="icon"></img>
- <span>Revision indexing in progress... (symbol and file search in this revision will be inaccurate before indexing completes)</span>
+ <span>Revision indexing in progress... (search in this revision will be accurate after indexed)</span>
</div>
<div wicket:id="lastCommit" class="last-commit clearfix"></div>
<div wicket:id="fileViewer" class="file-viewer"></div>