Clone should create Git instances which are able to close repository
Bug: 474093 Change-Id: I13be133dac7834d1d2b51eb9948a716b8719d057 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
This commit is contained in:
parent
5c2f52f72b
commit
7979029b43
|
@ -134,7 +134,7 @@ public Git call() throws GitAPIException, InvalidRemoteException,
|
|||
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 Git(Repository repo) {
|
|||
this(repo, false);
|
||||
}
|
||||
|
||||
private Git(Repository repo, boolean closeRepo) {
|
||||
Git(Repository repo, boolean closeRepo) {
|
||||
if (repo == null)
|
||||
throw new NullPointerException();
|
||||
this.repo = repo;
|
||||
|
|
Loading…
Reference in New Issue