aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java')
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java
index 0513fb2e24..9aa09b4648 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java
@@ -72,15 +72,14 @@ class Archive extends TextBuiltin {
if (tree == null)
throw die(CLIText.get().treeIsRequired);
- final ArchiveCommand cmd = new Git(db).archive();
try {
- cmd.setTree(tree)
- .setFormat(format)
- .setOutputStream(outs).call();
+ new Git(db).archive()
+ .setTree(tree)
+ .setFormat(format)
+ .setOutputStream(outs)
+ .call();
} catch (GitAPIException e) {
throw die(e.getMessage());
- } finally {
- cmd.release();
}
}
}