Skip to content

Commit 7e562cc

Browse files
author
Vladimir Kotal
committed
more JGit related cleanup
the date parsing is no longer needed because the commit date is not parsed from git log output anymore
1 parent 910d964 commit 7e562cc

File tree

2 files changed

+0
-28
lines changed

2 files changed

+0
-28
lines changed

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,6 @@ public class GitRepository extends RepositoryWithPerPartesHistory {
127127

128128
public GitRepository() {
129129
type = "git";
130-
/*
131-
* This should match the 'iso-strict' format used by
132-
* {@code getHistoryLogExecutor}.
133-
*/
134-
datePatterns = new String[] {
135-
"yyyy-MM-dd'T'HH:mm:ssXXX"
136-
};
137130

138131
ignoredDirs.add(".git");
139132
ignoredFiles.add(".git");

opengrok-indexer/src/test/java/org/opengrok/indexer/history/GitRepositoryTest.java

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -294,27 +294,6 @@ public void fileHasHistory() {
294294
assertTrue(result);
295295
}
296296

297-
@Test
298-
public void testDateFormats() {
299-
String[][] tests = new String[][] {
300-
{"abcd", "expected exception"},
301-
{"2016-01-01 10:00:00", "expected exception"},
302-
{"2016 Sat, 5 Apr 2008 15:12:51 +0000", "expected exception"},
303-
{"2017-07-25T13:17:44+02:00", null},
304-
};
305-
306-
final GitRepository repository = new GitRepository();
307-
308-
for (String[] test : tests) {
309-
try {
310-
repository.parse(test[0]);
311-
assertNull(test[1], "Shouldn't be able to parse the date: " + test[0]);
312-
} catch (ParseException ex) {
313-
assertNotNull(test[1], "Shouldn't throw a parsing exception for date: " + test[0]);
314-
}
315-
}
316-
}
317-
318297
/**
319298
* For the following renamed tests the structure in the git repo is as following:
320299
* <pre>

0 commit comments

Comments
 (0)