On Fri, Mar 30, 2018 at 11:24 PM, Jeff King <peff@xxxxxxxx> wrote: > On Sat, Mar 24, 2018 at 07:33:52AM +0100, Nguyễn Thái Ngọc Duy wrote: >> @@ -2004,10 +2006,12 @@ static int try_delta(struct unpacked *trg, struct unpacked *src, >> delta_buf = create_delta(src->index, trg->data, trg_size, &delta_size, max_size); >> if (!delta_buf) >> return 0; >> + if (delta_size >= (1 << OE_DELTA_SIZE_BITS)) >> + return 0; > > This is the other spot that needs to be "1U". > > How come this doesn't get a pdata->oe_delta_size_limit like we have > pdata->oe_size_limit? Would we want a matching > $GIT_TEST_OE_DELTA_SIZE_BITS to test it, too? Probably. This change does not look as risky as the others (no complicated fallback). But without $GIT_TEST_OE_DELTA_SIZE_BITS it's hard to know how the new code reacts when we get over the limit. I will add it. -- Duy