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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]