]> git.ipfire.org Git - thirdparty/git.git/commitdiff
pack-objects: fix comment of reused_chunk.difference
authorHan Xin <hanxin.hx@alibaba-inc.com>
Tue, 23 Mar 2021 03:20:50 +0000 (11:20 +0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 24 Mar 2021 20:03:22 +0000 (13:03 -0700)
As record_reused_object(offset, offset - hashfile_total(out)) said,
reused_chunk.difference should be the offset of original packfile minus
the offset of the generated packfile. But the comment presented an opposite way.

Signed-off-by: Han Xin <hanxin.hx@alibaba-inc.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/pack-objects.c

index 4bb602688c1231ccdd661164d925b2922ceecb8b..2aed16b6d37a8f9b08acfb3a3deab4dea8ece3c4 100644 (file)
@@ -815,8 +815,8 @@ static struct reused_chunk {
        /* The offset of the first object of this chunk in the original
         * packfile. */
        off_t original;
-       /* The offset of the first object of this chunk in the generated
-        * packfile minus "original". */
+       /* The difference for "original" minus the offset of the first object of
+        * this chunk in the generated packfile. */
        off_t difference;
 } *reused_chunks;
 static int reused_chunks_nr;