Skip to content

Commit 0c78194

Browse files
committed
Merge pull request #300 from rherrmann/patch-1
Fix #297: A2.3 shows wrong code to create a repository in JGit
2 parents 7ddee1c + b4ad33a commit 0c78194

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

book/B-embedding-git/sections/jgit.asc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ For a filesystem-based repository (yes, JGit allows for other storage models), t
4141

4242
[source,java]
4343
----
44-
// Create a new repository; the path must exist
44+
// Create a new repository
4545
Repository newlyCreatedRepo = FileRepositoryBuilder.create(
4646
new File("/tmp/new_repo/.git"));
47+
newlyCreatedRepo.create();
4748
4849
// Open an existing repository
4950
Repository existingRepo = new FileRepositoryBuilder()

0 commit comments

Comments
 (0)