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

[PATCH 0/2] object-file: fix packfile flush during transaction commit

From
Justin Tobler <jltobler@gmail.com>
Date
Sep 13, 2026, 20:26 UTC
Message-ID
<cover.1789328612.git.jltobler@gmail.com>
Greetings,

This short series fixes a bug I found related to committing an ODB transaction that contains both a loose object and "large" blob when also configured to batch fsync loose objects. The issue can be reproduced with the following:

	git init
	git config core.fsync loose-object
	git config core.fsyncMethod batch
	git config core.bigFileThreshold 5
	echo foo >1-foo && echo foobar >2-foobar
	git add 1-foo 2-foobar
and produces the following error:
	error: unable to write file .git/objects/pack/pack-2b7c2470289822070687e8d64186093a710eaed3.pack: No such file or directory
	fatal: unable to rename temporary file to '.git/objects/pack/pack-2b7c2470289822070687e8d64186093a710eaed3.pack'

If a "large" blob packfile is written to the transaction temporary directory, it is unable to be flushed during transaction commit because the underlying transaction is migrated to the main ODB before the packfile is finalized. To avoid this, this series ensures any pending packfile in the transaction is flushed first.

Thanks, -Justin

Justin Tobler (2):
  object-file: lift ODB reprepare out of packfile flush
  object-file: flush transaction packfile before migrating objects
 object-file.c    | 12 ++++++++----
 t/t1050-large.sh | 16 ++++++++++++++++
 2 files changed, 24 insertions(+), 4 deletions(-)
base-commit: 47ce80527c56f462cb97db4ca8125342204d3783
-- 
2.55.0
Next: Justin Tobler
Message 1 of 18 in “object-file: fix packfile flush during transaction commit”
  1. 0/2 object-file: fix packfile flush during transaction commitJustin Tobler, Sep 13, 2026
  2. 1/2 object-file: lift ODB reprepare out of packfile flushJustin Tobler, Sep 13, 2026
  3. Karthik NayakSep 15, 2026
  4. Justin ToblerSep 15, 2026
  5. Patrick SteinhardtSep 23, 2026
  6. Justin ToblerSep 23, 2026
  7. Patrick SteinhardtSep 24, 2026
  8. Patrick SteinhardtSep 24, 2026
  9. 2/2 object-file: flush transaction packfile before migrating objectsJustin Tobler, Sep 13, 2026
  10. Karthik NayakSep 15, 2026
  11. Justin ToblerSep 15, 2026
  12. Patrick SteinhardtSep 23, 2026
  13. Justin ToblerSep 23, 2026
  14. 0/2 object-file: fix packfile flush during transaction commitJustin Tobler, Sep 23, 2026
  15. 1/2 object-file: lift ODB reprepare out of packfile flushJustin Tobler, Sep 23, 2026
  16. Patrick SteinhardtSep 24, 2026
  17. 2/2 object-file: flush transaction packfile before migrating objectsJustin Tobler, Sep 23, 2026
  18. Patrick SteinhardtSep 24, 2026

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.