git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marat Radchenko <marat@slonopotamus.org>
To: git@vger.kernel.org
Subject: Re: [BUG] git repack fails if .git/objects/pack is on a separate partition
Date: Tue, 19 Oct 2010 00:40:40 -0700 (PDT)	[thread overview]
Message-ID: <1287474040065-5649864.post@n2.nabble.com> (raw)
In-Reply-To: <1287473363910-5649843.post@n2.nabble.com>


Testcase:

# tell it where is other partition
OTHER_PARTITION=/path/to/other/partition/

# init repo
mkdir foo && cd foo && git init

# put some stuff and run gc to create packfile
cp /etc/fstab . && git add fstab && git commit -m "initial" && git gc

# move pack dir to other partition and install symlink
mv .git/objects/pack $OTHER_PARTITION && ln -s $OTHER_PARTITION/pack
.git/objects/pack

# run gc (it fails)
strace -f git gc 2>&1 | grep rename

[pid  3792] rename(".git/packed-refs.lock", ".git/packed-refs") = 0
[pid  3793] rename(".git/logs/refs/heads/master.lock",
".git/logs/refs/heads/master") = 0
[pid  3793] rename(".git/logs/HEAD.lock", ".git/logs/HEAD") = 0
[pid  3808] rename(".git/objects/pack/tmp_pack_8ZhS92",
"/home/marat/foo/.git/objects/.tmp-3795-pack-da13ceb9f70c2762595a7a2932411db339bdab46.pack")
= -1 EXDEV (Invalid cross-device link)
[pid  3808] write(2, "fatal: unable to rename temporar"..., 71fatal: unable
to rename temporary pack file: Invalid cross-device link

So you see, it tries to move packfile from .git/objects/pack to .git/objects
-- 
View this message in context: http://git.661346.n2.nabble.com/BUG-git-repack-fails-if-git-objects-pack-is-on-a-separate-partition-tp5649732p5649864.html
Sent from the git mailing list archive at Nabble.com.

  reply	other threads:[~2010-10-19  7:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1287474040065-5649864.post@n2.nabble.com \
    --to=marat@slonopotamus.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).