Bug: 474093 Change-Id: I13be133dac7834d1d2b51eb9948a716b8719d057 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>tags/v4.1.0.201509280440-r
@@ -134,7 +134,7 @@ public class CloneCommand extends TransportCommand<CloneCommand, Git> { | |||
FetchResult result = fetch(repository, u); | |||
if (!noCheckout) | |||
checkout(repository, result); | |||
return new Git(repository); | |||
return new Git(repository, true); | |||
} catch (IOException ioe) { | |||
if (repository != null) { | |||
repository.close(); |
@@ -207,7 +207,7 @@ public class Git implements AutoCloseable { | |||
this(repo, false); | |||
} | |||
private Git(Repository repo, boolean closeRepo) { | |||
Git(Repository repo, boolean closeRepo) { | |||
if (repo == null) | |||
throw new NullPointerException(); | |||
this.repo = repo; |