git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: René Scharfe
Message 2 of 2 in “fast-import: use write_pack_header()”
  1. fast-import: use write_pack_header()René Scharfe, Sep 6, 2020
  2. Jeff KingSep 10, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.