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

Re: [PATCH 01/11] midx-write: initial commit

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 25, 2024, 20:30 UTC
Message-ID
<xmqq1q7yjbpz.fsf@gitster.g>
In-Reply-To
<ffa8ba18de8be68eb8dbb1e17b5bf8800f564505.1711387439.git.me@ttaylorr.com>
Taylor Blau <me@ttaylorr.com> writes:
Show 36 quoted lines
> Introduce a new empty midx-write.c source file. Similar to the
> relationship between "pack-bitmap.c" and "pack-bitmap-write.c", this
> source file will hold code that is specific to writing MIDX files as
> opposed to reading them (the latter will remain in midx.c).
>
> This is a preparatory step which will reduce the overall size of midx.c
> and make it easier to read as we prepare for future changes to that file
> (outside the immediate scope of this series).
>
> Signed-off-by: Taylor Blau <me@ttaylorr.com>
> ---
>  Makefile     | 1 +
>  midx-write.c | 2 ++
>  2 files changed, 3 insertions(+)
>  create mode 100644 midx-write.c
>
> diff --git a/Makefile b/Makefile
> index 4e255c81f2..cf44a964c0 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1072,6 +1072,7 @@ LIB_OBJS += merge-ort-wrappers.o
>  LIB_OBJS += merge-recursive.o
>  LIB_OBJS += merge.o
>  LIB_OBJS += midx.o
> +LIB_OBJS += midx-write.o
>  LIB_OBJS += name-hash.o
>  LIB_OBJS += negotiator/default.o
>  LIB_OBJS += negotiator/noop.o
> diff --git a/midx-write.c b/midx-write.c
> new file mode 100644
> index 0000000000..214179d308
> --- /dev/null
> +++ b/midx-write.c
> @@ -0,0 +1,2 @@
> +#include "git-compat-util.h"
> +#include "midx.h"

I noticed that "nm midx-write.o" after this step gives us nothing. A source that produces absolutely nothing may not successfully compile everywhere. It is unlikely we will stop the series at this step and it won't break bisection, though.

I do not quite see why the first 3 patches need to be split this way, rather than being done as a single step. Is it making the review any simpler?

Previous: Taylor BlauNext: Taylor Blau
Message 3 of 30 in “midx: split MIDX writing routines into midx-write.c, cleanup”
  1. 00/11 midx: split MIDX writing routines into midx-write.c, cleanupTaylor Blau, Mar 25, 2024
  2. 01/11 midx-write: initial commitTaylor Blau, Mar 25, 2024
  3. Junio C HamanoMar 25, 2024
  4. Taylor BlauMar 25, 2024
  5. 02/11 midx: extern a pair of shared functionsTaylor Blau, Mar 25, 2024
  6. 03/11 midx: move `midx_repack` (and related functions) to midx-write.cTaylor Blau, Mar 25, 2024
  7. 04/11 midx: move `expire_midx_packs` to midx-write.cTaylor Blau, Mar 25, 2024
  8. 05/11 midx: move `write_midx_file_only` to midx-write.cTaylor Blau, Mar 25, 2024
  9. 06/11 midx: move `write_midx_file` to midx-write.cTaylor Blau, Mar 25, 2024
  10. 07/11 midx: move `write_midx_internal` (and related functions) to midx-write.cTaylor Blau, Mar 25, 2024
  11. 08/11 midx-write.c: avoid directly managed temporary strbufTaylor Blau, Mar 25, 2024
  12. Junio C HamanoMar 25, 2024
  13. Taylor BlauMar 25, 2024
  14. 09/11 midx-write.c: factor out common want_included_pack() routineTaylor Blau, Mar 25, 2024
  15. Junio C HamanoMar 25, 2024
  16. Jeff KingMar 27, 2024
  17. 10/11 midx-write.c: check count of packs to repack after groupingTaylor Blau, Mar 25, 2024
  18. Junio C HamanoMar 25, 2024
  19. Taylor BlauMar 25, 2024
  20. 11/11 midx-write.c: use `--stdin-packs` when repackingTaylor Blau, Mar 25, 2024
  21. Jeff KingMar 27, 2024
  22. Jeff KingMar 27, 2024
  23. 0/4 midx: split MIDX writing routines into midx-write.c, cleanupTaylor Blau, Apr 1, 2024
  24. 1/4 midx-write: move writing-related functions from midx.cTaylor Blau, Apr 1, 2024
  25. 2/4 midx-write.c: factor out common want_included_pack() routineTaylor Blau, Apr 1, 2024
  26. Patrick SteinhardtApr 2, 2024
  27. 3/4 midx-write.c: check count of packs to repack after groupingTaylor Blau, Apr 1, 2024
  28. 4/4 midx-write.c: use `--stdin-packs` when repackingTaylor Blau, Apr 1, 2024
  29. Junio C HamanoApr 1, 2024
  30. Patrick SteinhardtApr 2, 2024

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.