Re: [PATCH] fast-import: use write_pack_header()
- From
Jeff King <peff@peff.net>
- Date
- Sep 10, 2020, 12:41 UTC
- Message-ID
- <20200910124128.GA58063@coredump.intra.peff.net>
- In-Reply-To
- <7613ef32-f39c-ea4b-1cfc-88d255307186@web.de>
On Sun, Sep 06, 2020 at 10:39:23AM +0200, René Scharfe wrote:
Show 6 quoted lines
> 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