Skip to content

Commit 56378c9

Browse files
author
Vladimir Kotal
committed
simplify
1 parent 1622327 commit 56378c9

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/history/GitRepository.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -673,15 +673,11 @@ private String getGitDirValue(File dotGit) {
673673
while (scanner.hasNextLine()) {
674674
String line = scanner.nextLine();
675675
if (line.startsWith(Constants.GITDIR)) {
676-
String[] array = line.split(": ");
677-
if (array.length == 2) {
678-
return array[1];
679-
}
676+
return line.substring(Constants.GITDIR.length());
680677
}
681678
}
682679
} catch (IOException e) {
683680
LOGGER.log(Level.WARNING, "failed to scan the contents of file ''{0}''", dotGit);
684-
return null;
685681
}
686682

687683
return null;

0 commit comments

Comments
 (0)