]> source.dussan.org Git - jgit.git/commit
RepoCommand: Don't leave Git open 17/117317/7
authorDavid Pursehouse <david.pursehouse@gmail.com>
Wed, 14 Feb 2018 01:30:12 +0000 (10:30 +0900)
committerDavid Pursehouse <david.pursehouse@gmail.com>
Thu, 15 Feb 2018 07:59:42 +0000 (16:59 +0900)
commit9bebb1eae78401e1d3289dc3d84006c10d10c0ef
treec2d0e00dea67353c4c65dedf9ef841a8a5e4e077
parent282dc592da152a224f58df6b21fd5f594a8778fb
RepoCommand: Don't leave Git open

When the command is run on a non-bare repository, an instance of
Git is created to execute the commit, and is left open when the
command has finished.

Refactor to not use a class scope Git instance, and make sure it
gets closed before returning.

Change-Id: Ic623ae0fd8b9e264b5dfd434da0de6bb4f910984
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java