git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] git repack fails if .git/objects/pack is on a separate partition
@ 2010-10-19  6:28 Marat Radchenko
  2010-10-19  6:59 ` Thomas Rast
  0 siblings, 1 reply; 7+ messages in thread
From: Marat Radchenko @ 2010-10-19  6:28 UTC (permalink / raw)
  To: git


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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-10-19 16:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-19  6:28 [BUG] git repack fails if .git/objects/pack is on a separate partition Marat Radchenko
2010-10-19  6:59 ` Thomas Rast
2010-10-19  7:29   ` Marat Radchenko
2010-10-19  7:40     ` Marat Radchenko
2010-10-19  9:50       ` [PATCH] repack: place temporary packs under .git/objects/pack/ Thomas Rast
2010-10-19 10:17         ` Marat Radchenko
2010-10-19 16:33         ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).