diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/T0003_BasicTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/T0003_BasicTest.java index ec5c8848f..408bb9303 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/T0003_BasicTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/T0003_BasicTest.java @@ -89,6 +89,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase { @Test public void test001_Initalize() { final File gitdir = new File(trash, Constants.DOT_GIT); + final File hooks = new File(gitdir, "hooks"); final File objects = new File(gitdir, "objects"); final File objects_pack = new File(objects, "pack"); final File objects_info = new File(objects, "info"); @@ -98,6 +99,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase { final File HEAD = new File(gitdir, "HEAD"); assertTrue("Exists " + trash, trash.isDirectory()); + assertTrue("Exists " + hooks, hooks.isDirectory()); assertTrue("Exists " + objects, objects.isDirectory()); assertTrue("Exists " + objects_pack, objects_pack.isDirectory()); assertTrue("Exists " + objects_info, objects_info.isDirectory()); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/FileRepository.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/FileRepository.java index 5a54e86bf..e2bcb01e9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/FileRepository.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/FileRepository.java @@ -244,6 +244,7 @@ public class FileRepository extends Repository { objectDatabase.create(); FileUtils.mkdir(new File(getDirectory(), "branches")); + FileUtils.mkdir(new File(getDirectory(), "hooks")); RefUpdate head = updateRef(Constants.HEAD); head.disableRefLog();