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

Re: Git Test Coverage Report for v2.37.0-rc0

From
Taylor Blau <me@ttaylorr.com>
Date
Jun 14, 2022, 23:46 UTC
Message-ID
<Yqkd5GNYAKBnPQxz@nand.local>
In-Reply-To
<3d1c6dfd-1df6-3393-df5e-692719375772@github.com>
On Tue, Jun 14, 2022 at 04:20:05PM -0400, Derrick Stolee wrote:
Show 5 quoted lines
> > Taylor Blau	f9825d1c builtin/repack.c: support generating a cruft pack
> > builtin/repack.c
> > f9825d1c 680) strvec_pushf(&cmd.args, "--cruft-expiration=%s",
>
> The --cruft-expiration option is not tested.

Note that only the `--cruft-expiration` option of `git repack` is untested. This code is just passing down the expiration from `repack`'s perspective down to pack-objects, which has extensive coverage of the `--cruft-expiration` option in t5329.

It does feel a little weird to leave this uncovered, but I don't think it's substantially different from the uncovered lines in setting up `cruft_po_args` on lines 86-90 of the repack code.

> > f9825d1c 708) fprintf(in, "%s.pack\n", item->string);
>
> This is related to the existence of .keep packs. A corner case, but maybe
> worth exploring.

Probably worth testing. We're ensuring that `.keep` packs in addition to `--keep-pack`s are excluded from the cruft pack. That isn't tested and probably should be.

Show 8 quoted lines
>
> > pack-write.c
> > 5dfaf49a 330) unlink(mtimes_name);
> > 5dfaf49a 331) fd = xopen(mtimes_name, O_CREAT|O_EXCL|O_WRONLY, 0600);
>
> This appears to be an interesting case for the write_mtimes_file() method,
> since its first parameter is 'mtimes_name' and all tested cases are
> passing NULL, it seems.

Ugh, yes :-). That's imitating a common pattern in the write_xyz_file() for xyz referring to auxiliary pack data. The cleanup should be pretty straightforward, I'll send a patch or two shortly...

Thanks, Taylor

Previous: Derrick StoleeNext: Ævar Arnfjörð Bjarmason
Message 4 of 6 in “Git Test Coverage Report for v2.37.0-rc0”
  1. Derrick StoleeJun 14, 2022
  2. Derrick StoleeJun 14, 2022
  3. Derrick StoleeJun 14, 2022
  4. Taylor BlauJun 14, 2022
  5. Ævar Arnfjörð BjarmasonJun 15, 2022
  6. Derrick StoleeJun 15, 2022

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.