From: Duy Nguyen Date: Tue, 20 Mar 2018 18:08:07 GMT Subject: Re: [PATCH v6 09/11] pack-objects: shrink size field in struct object_entry Message-ID: <20180320180806.GA16521@duynguyen.home> In-Reply-To: On Mon, Mar 19, 2018 at 01:10:49PM -0700, Junio C Hamano wrote: > > ... I was trying to exercise this > > code the other day by reducing size_ field down to 4 bits, and a > > couple tests broke but I still don't understand how. > > Off by one? Two or more copies of the same objects available whose > oe_size() are different? > No. I did indeed not understand pack-objects enough :) This "size" field contains the delta size if the in-pack object is a delta. So blindly falling back to object_sha1_info() which returns the canonical object size is definitely wrong. Please eject the series from 'pu' until I fix this. The bug won't likely affect anyone (since they must have 4GB+ objects to trigger it) but better safe than sorry. BTW can you apply this patch? This broken && chain made me think the problem was in the next test. It would have saved me lots of time if I saw this "BUG" line coming from the previous test. -- 8< -- Subject: [PATCH] t9300: fix broken && chain Signed-off-by: Nguyễn Thái Ngọc Duy --- t/t9300-fast-import.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index e4d06accc4..e2a0ae4075 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -348,7 +348,7 @@ test_expect_success 'B: accept branch name "TEMP_TAG"' ' INPUT_END test_when_finished "rm -f .git/TEMP_TAG - git gc + git gc && git prune" && git fast-import