summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Linus Torvalds <torvalds@ppc970.osdl.org>2005-06-27 17:02:56 -0700
committerLibravatar Linus Torvalds <torvalds@ppc970.osdl.org>2005-06-27 17:02:56 -0700
commit2700628e64939c9496f8ca532b7c188e5927d500 (patch)
tree6680308291954f95fc472487237a09454010c551
parent[PATCH] Teach read_sha1_file() and friends about packed git object store. (diff)
downloadtgif-2700628e64939c9496f8ca532b7c188e5927d500.tar.xz
csum-file: fix missing buf pointer update
This would create broken pack archives for anything nontrivial.
-rw-r--r--csum-file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/csum-file.c b/csum-file.c
index 9f9553ae03..3ab65b7515 100644
--- a/csum-file.c
+++ b/csum-file.c
@@ -58,6 +58,7 @@ int sha1write(struct sha1file *f, void *buf, unsigned int count)
memcpy(f->buffer + offset, buf, nr);
count -= nr;
offset += nr;
+ buf += nr;
left -= nr;
if (!left) {
SHA1_Update(&f->ctx, f->buffer, offset);