Git Mailing List Archive mirror
 help / color / mirror / Atom feed
From: Taylor Blau <me@ttaylorr.com>
To: git@vger.kernel.org
Cc: Jeff King <peff@peff.net>, Junio C Hamano <gitster@pobox.com>
Subject: [PATCH 00/11] midx: split MIDX writing routines into midx-write.c, cleanup
Date: Mon, 25 Mar 2024 13:24:11 -0400	[thread overview]
Message-ID: <cover.1711387439.git.me@ttaylorr.com> (raw)

This is a small-ish series that I worked on to split the functions from
midx.c which are responsible for writing MIDX files into a separate
compilation unit, midx-write.c.

This is done for a couple of reasons:

  - It reduces the size of midx.c, which is already quite large, thus
    making it easier to read.

  - It more clearly separates responsibility between the two, similar to
    the division between pack-bitmap.c, and pack-bitmap-write.c.

Most importantly, it makes midx.c easier to read in preparation for
future changes that I hope to make to midx.c in order to support
incremental MIDXs in a repository.

The series is structured as follows:

  - The first seven patches move all writing-related functions from
    midx.c to their new home in midx-write.c.

  - The remaining four patches rewrite `git multi-pack-index repack` in
    terms of `git pack-objects --stdin-packs`, yielding more
    tightly-packed output as a result of the supplemental traversal
    performed by `--stdin-packs`.

The first seven are the main goal of this series, and the remaining four
could be queued separately, depending on how folks feel about them.

Thanks in advance for your review!

Taylor Blau (11):
  midx-write: initial commit
  midx: extern a pair of shared functions
  midx: move `midx_repack` (and related functions) to midx-write.c
  midx: move `expire_midx_packs` to midx-write.c
  midx: move `write_midx_file_only` to midx-write.c
  midx: move `write_midx_file` to midx-write.c
  midx: move `write_midx_internal` (and related functions) to
    midx-write.c
  midx-write.c: avoid directly managed temporary strbuf
  midx-write.c: factor out common want_included_pack() routine
  midx-write.c: check count of packs to repack after grouping
  midx-write.c: use `--stdin-packs` when repacking

 Makefile     |    1 +
 midx-write.c | 1525 ++++++++++++++++++++++++++++++++++++++++++++++++
 midx.c       | 1558 +-------------------------------------------------
 midx.h       |   19 +
 4 files changed, 1559 insertions(+), 1544 deletions(-)
 create mode 100644 midx-write.c


base-commit: 3bd955d26919e149552f34aacf8a4e6368c26cec
-- 
2.44.0.290.g736be63234b

             reply	other threads:[~2024-03-25 17:24 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-25 17:24 Taylor Blau [this message]
2024-03-25 17:24 ` [PATCH 01/11] midx-write: initial commit Taylor Blau
2024-03-25 20:30   ` Junio C Hamano
2024-03-25 22:09     ` Taylor Blau
2024-03-25 17:24 ` [PATCH 02/11] midx: extern a pair of shared functions Taylor Blau
2024-03-25 17:24 ` [PATCH 03/11] midx: move `midx_repack` (and related functions) to midx-write.c Taylor Blau
2024-03-25 17:24 ` [PATCH 04/11] midx: move `expire_midx_packs` " Taylor Blau
2024-03-25 17:24 ` [PATCH 05/11] midx: move `write_midx_file_only` " Taylor Blau
2024-03-25 17:24 ` [PATCH 06/11] midx: move `write_midx_file` " Taylor Blau
2024-03-25 17:24 ` [PATCH 07/11] midx: move `write_midx_internal` (and related functions) " Taylor Blau
2024-03-25 17:24 ` [PATCH 08/11] midx-write.c: avoid directly managed temporary strbuf Taylor Blau
2024-03-25 20:33   ` Junio C Hamano
2024-03-25 22:11     ` Taylor Blau
2024-03-25 17:24 ` [PATCH 09/11] midx-write.c: factor out common want_included_pack() routine Taylor Blau
2024-03-25 20:36   ` Junio C Hamano
2024-03-27  8:29   ` Jeff King
2024-03-25 17:24 ` [PATCH 10/11] midx-write.c: check count of packs to repack after grouping Taylor Blau
2024-03-25 20:41   ` Junio C Hamano
2024-03-25 22:11     ` Taylor Blau
2024-03-25 17:24 ` [PATCH 11/11] midx-write.c: use `--stdin-packs` when repacking Taylor Blau
2024-03-27  8:37   ` Jeff King
2024-03-27  8:39 ` [PATCH 00/11] midx: split MIDX writing routines into midx-write.c, cleanup Jeff King
2024-04-01 21:16 ` [PATCH v2 0/4] " Taylor Blau
2024-04-01 21:16   ` [PATCH v2 1/4] midx-write: move writing-related functions from midx.c Taylor Blau
2024-04-01 21:16   ` [PATCH v2 2/4] midx-write.c: factor out common want_included_pack() routine Taylor Blau
2024-04-02 11:47     ` Patrick Steinhardt
2024-04-01 21:16   ` [PATCH v2 3/4] midx-write.c: check count of packs to repack after grouping Taylor Blau
2024-04-01 21:16   ` [PATCH v2 4/4] midx-write.c: use `--stdin-packs` when repacking Taylor Blau
2024-04-01 21:45     ` Junio C Hamano
2024-04-02 11:47     ` Patrick Steinhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1711387439.git.me@ttaylorr.com \
    --to=me@ttaylorr.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).