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

Re: [PATCH v1 3/4] builtin/repack.c: change xwrite to write_in_full to allow large sizes.

From
Jeff King <peff@peff.net>
Date
Feb 27, 2024, 08:22 UTC
Message-ID
<20240227082253.GI3263678@coredump.intra.peff.net>
In-Reply-To
<20240227082027.GH3263678@coredump.intra.peff.net>
On Tue, Feb 27, 2024 at 03:20:27AM -0500, Jeff King wrote:
Show 10 quoted lines
> OK, so we detect the error and return it to the caller. Who is the
> caller? The only use of this function is in repack_promisor_objects(),
> which calls:
> 
>         for_each_packed_object(write_oid, &cmd,
>                                FOR_EACH_OBJECT_PROMISOR_ONLY);
> 
> So when we return the error, now for_each_packed_object() will stop
> traversing, and propagate that error up to the caller. But as we can see
> above, the caller ignores it!

Oh, one other thing I meant to mention: as the test failure you saw was related to repacking, this seemed like a likely culprit. But the code is only triggered when repacking promisor objects in a partial clone, and it didn't look like the test you posted covered that (it was just about cruft packs). So I would not expect this code to be run at all in the failing test you saw.

-Peff
Previous: Jeff KingNext: Randall S. Becker
Message 15 of 18 in “Change xwrite() to write_in_full() in builtins.”
  1. 0/4 Change xwrite() to write_in_full() in builtins.Randall S. Becker, Feb 26, 2024
  2. 1/4 builtin/index-pack.c: change xwrite to write_in_full to allow large sizes.Randall S. Becker, Feb 26, 2024
  3. Taylor BlauFeb 26, 2024
  4. rsbecker@nexbridge.comFeb 26, 2024
  5. Junio C HamanoFeb 26, 2024
  6. rsbecker@nexbridge.comFeb 27, 2024
  7. rsbecker@nexbridge.comFeb 26, 2024
  8. 2/4 builtin/receive-pack.c: change xwrite to write_in_full to allow large sizes.Randall S. Becker, Feb 26, 2024
  9. rsbecker@nexbridge.comFeb 26, 2024
  10. Junio C HamanoFeb 26, 2024
  11. rsbecker@nexbridge.comFeb 27, 2024
  12. 3/4 builtin/repack.c: change xwrite to write_in_full to allow large sizes.Randall S. Becker, Feb 26, 2024
  13. Junio C HamanoFeb 26, 2024
  14. Jeff KingFeb 27, 2024
  15. Jeff KingFeb 27, 2024
  16. 4/4 builtin/unpack-objects.c: change xwrite to write_in_full to allow large sizes.Randall S. Becker, Feb 26, 2024
  17. Junio C HamanoFeb 26, 2024
  18. rsbecker@nexbridge.comFeb 27, 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.