Skip to content

Commit 0fde8d7

Browse files
committed
Very important tweak - no subclasses of ObjectInserter are threadsafe
The blobId was only used in BFG test code, not in any released impl code, thankfully.
1 parent 0c19eb5 commit 0fde8d7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

scala-git/src/main/scala/com/madgag/git/package.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,8 @@ import scala.util.{Success, Try}
4141

4242
package object git {
4343

44-
val ObjectFormatter = new Formatter
45-
4644
implicit class RichByteArray(bytes: Array[Byte]) {
47-
lazy val blobId = ObjectFormatter.idFor(OBJ_BLOB, bytes)
45+
lazy val blobId = (new Formatter).idFor(OBJ_BLOB, bytes)
4846
}
4947

5048
def storeBlob(bytes: Array[Byte])(implicit i: ObjectInserter): ObjectId = i.insert(OBJ_BLOB, bytes)

0 commit comments

Comments
 (0)