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

[BUG] git repack fails if .git/objects/pack is on a separate partition

From
Marat Radchenko <marat@slonopotamus.org>
Date
Oct 19, 2010, 06:28 UTC
Message-ID
<1287469706023-5649732.post@n2.nabble.com>
Console log:

Counting objects: 5137063, done. Delta compression using up to 4 threads. Compressing objects: 100% (892984/892984), done. fatal: unable to rename temporary pack file: Invalid cross-device link error: failed to run repack

Reason: write_pack_file in builtin/pack-objects.c first writes tmp file in "pack/tmp_pack_XXXXXX".

Then, it tries to rename it to "%s-%s.pack":
snprintf(tmpname, sizeof(tmpname), "%s-%s.pack",
                                 base_name, sha1_to_hex(sha1));
...
if (rename(pack_tmp_name, tmpname))
                                die_errno("unable to rename temporary pack
file");

and happily fails because that crosses device boundary. Same problem with index file. Suggested fix: do those renames inside pack directory or avoid them at all.

-- 
View this message in context: http://git.661346.n2.nabble.com/BUG-git-repack-fails-if-git-objects-pack-is-on-a-separate-partition-tp5649732p5649732.html
Sent from the git mailing list archive at Nabble.com.
Next: Thomas Rast
Message 1 of 7 in “[BUG] git repack fails if .git/objects/pack is on a separate partition”
  1. Marat RadchenkoOct 19, 2010
  2. Thomas RastOct 19, 2010
  3. Marat RadchenkoOct 19, 2010
  4. Marat RadchenkoOct 19, 2010
  5. repack: place temporary packs under .git/objects/pack/Thomas Rast, Oct 19, 2010
  6. Marat RadchenkoOct 19, 2010
  7. Junio C HamanoOct 19, 2010

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.