Imported Upstream version 2.30.1
[platform/upstream/git.git] / csum-file.c
index 53ce37f..0f35fa5 100644 (file)
@@ -157,7 +157,7 @@ void hashfile_checkpoint(struct hashfile *f, struct hashfile_checkpoint *checkpo
 {
        hashflush(f);
        checkpoint->offset = f->total;
-       checkpoint->ctx = f->ctx;
+       the_hash_algo->clone_fn(&checkpoint->ctx, &f->ctx);
 }
 
 int hashfile_truncate(struct hashfile *f, struct hashfile_checkpoint *checkpoint)