aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/patch/git.go
diff options
context:
space:
mode:
authorAdam Langley <agl@golang.org>2011-12-01 12:35:37 -0500
committerAdam Langley <agl@golang.org>2011-12-01 12:35:37 -0500
commitbac7bc55a6a8776f45144452a7236e34cdb09de6 (patch)
tree4630e0bcc2dae65f64a944ee1cf63750dfb538a1 /src/pkg/patch/git.go
parent2308aefc845d16c44882cff5590903b74aab42bf (diff)
downloadgo-bac7bc55a6a8776f45144452a7236e34cdb09de6.tar.xz
Add a []byte argument to hash.Hash to allow an allocation to be saved.
This is the result of running `gofix -r hashsum` over the tree, changing the hash function implementations by hand and then fixing a couple of instances where gofix didn't catch something. The changed implementations are as simple as possible while still working: I'm not trying to optimise in this CL. R=rsc, cw, rogpeppe CC=golang-dev https://golang.org/cl/5448065
Diffstat (limited to 'src/pkg/patch/git.go')
-rw-r--r--src/pkg/patch/git.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/patch/git.go b/src/pkg/patch/git.go
index 454eadecec..5c233fbaeb 100644
--- a/src/pkg/patch/git.go
+++ b/src/pkg/patch/git.go
@@ -22,7 +22,7 @@ func gitSHA1(data []byte) []byte {
h := sha1.New()
fmt.Fprintf(h, "blob %d\x00", len(data))
h.Write(data)
- return h.Sum()
+ return h.Sum(nil)
}
// BUG(rsc): The Git binary delta format is not implemented, only Git binary literals.