After staring not-so-hard and not-for-so-long at the code. This is what I come up with. Rasmus I replaced two of your commits with my own (and thank you for giving me an opportunity to refresh my memory with this stuff). The first two commits are new and the result of Jeff's observation on COMMIT_SLAB_SIZE. You may find the description here a bit different from my explanation previously (about "exclude/shallow requests"). Well.. I was wrong. I had the recent --exclude-tag and friends in mind, but this is about clone/fetch/push from/to a shallow repository since 2013, no wonder I don't remember much about it :-D Nguyễn Thái Ngọc Duy (4): shallow.c: rename fields in paint_info to better express their purposes shallow.c: stop abusing COMMIT_SLAB_SIZE for paint_info's memory pools shallow.c: make paint_alloc slightly more robust shallow.c: remove useless code Rasmus Villemoes (2): shallow.c: avoid theoretical pointer wrap-around shallow.c: bit manipulation tweaks shallow.c | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) -- 2.8.2.524.g6ff3d78