From 0aae0d82fc94c29db16407ef94c8f2b0a32f1ee4 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Mon, 23 Feb 2009 08:04:52 -0800 Subject: [PATCH] Set core.bare = false during "jgit clone" This way we initialize the repository like "git clone" would have initialized it. Signed-off-by: Shawn O. Pearce --- org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/Clone.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/Clone.java b/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/Clone.java index 51dd95dc..333b43cb 100644 --- a/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/Clone.java +++ b/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/Clone.java @@ -99,8 +99,12 @@ class Clone extends AbstractFetchCommand { } if (gitdir == null) gitdir = new File(localName, ".git"); + db = new Repository(gitdir); db.create(); + db.getConfig().setBoolean("core", null, "bare", false); + db.getConfig().save(); + out.println("Initialized empty Git repository in " + gitdir.getAbsolutePath()); out.flush(); -- 2.11.4.GIT