diff options
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java index b39603adac..ad0b3332cf 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java @@ -177,6 +177,8 @@ public abstract class ObjectInserter implements AutoCloseable { } } + private final SHA1 hasher = SHA1.newInstance(); + /** Temporary working buffer for streaming data through. */ private byte[] tempBuffer; @@ -217,7 +219,7 @@ public abstract class ObjectInserter implements AutoCloseable { /** @return digest to help compute an ObjectId */ protected SHA1 digest() { - return SHA1.newInstance(); + return hasher.reset(); } /** |