diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2019-06-27 00:39:24 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2019-07-17 09:42:14 +0200 |
commit | 79ede0c3227b0c5f5d7790b58a0881486e06d7cc (patch) | |
tree | 50a9cb60618336e469c0fcda6df0a0d5da8e8f1c /org.eclipse.jgit.test | |
parent | be66222d1a607ef3feb3b076352e9b8251e0eec2 (diff) | |
download | jgit-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.java | 8 |
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)); + } } |