aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2019-06-27 00:39:24 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2019-07-17 09:42:14 +0200
commit79ede0c3227b0c5f5d7790b58a0881486e06d7cc (patch)
tree50a9cb60618336e469c0fcda6df0a0d5da8e8f1c /org.eclipse.jgit.test
parentbe66222d1a607ef3feb3b076352e9b8251e0eec2 (diff)
downloadjgit-79ede0c3227b0c5f5d7790b58a0881486e06d7cc.tar.gz
jgit-79ede0c3227b0c5f5d7790b58a0881486e06d7cc.zip
Fix NPE in FS$FileStoreAttributeCache.getFsTimestampResolution
Bug: 548682 Change-Id: I48840d3a68cf1db92c056d218a0d5ed0b9ea4c45 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FSTest.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FSTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FSTest.java
index 59c8e31c03..6b3d58bae7 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FSTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FSTest.java
@@ -65,6 +65,7 @@ import java.util.concurrent.TimeUnit;
import org.eclipse.jgit.errors.CommandFailedException;
import org.eclipse.jgit.junit.RepositoryTestCase;
+import org.eclipse.jgit.lib.RepositoryCache;
import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
@@ -223,4 +224,11 @@ public class FSTest {
}
}
}
+
+ // bug 548682
+ @Test
+ public void testRepoCacheRelativePathUnbornRepo() {
+ assertFalse(RepositoryCache.FileKey
+ .isGitRepository(new File("repo.git"), FS.DETECTED));
+ }
}