On Sun, Sep 06, 2020 at 10:39:23AM +0200, René Scharfe wrote: > Call write_pack_header() to hash and write a pack header instead of > open-coding this function. This gets rid of duplicate code and of the > magic version number 2 -- which has been used here since c90be46abd > (Changed fast-import's pack header creation to use pack.h, 2006-08-16) > and in pack.h (again) since 29f049a0c2 (Revert "move pack creation to > version 3", 2006-10-14). I think this is worth doing. It locks us into using PACK_VERSION, but that has been constant for quite a long time now. If we ever finally have a v4 pack, I expect write_pack_header would grow a version option and we could deal with it then. :) -Peff