Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-pack-objects.c')
-rw-r--r--builtin-pack-objects.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index d0be879443..03e36f0183 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -44,6 +44,7 @@ struct object_entry {
* be used as the base objectto delta huge
* objects against.
*/
+ uint32_t crc32; /* crc of raw pack data for this object */
};
/*
@@ -381,6 +382,9 @@ static unsigned long write_object(struct sha1file *f,
enum object_type obj_type;
int to_reuse = 0;
+ if (!pack_to_stdout)
+ crc32_begin(f);
+
obj_type = entry->type;
if (! entry->in_pack)
to_reuse = 0; /* can't reuse what we don't have */
@@ -496,6 +500,8 @@ static unsigned long write_object(struct sha1file *f,
if (entry->delta)
written_delta++;
written++;
+ if (!pack_to_stdout)
+ entry->crc32 = crc32_end(f);
return hdrlen + datalen;
}