Subject: Re: "git-checkout-cache -f -a" failure

From: Morten Welinder <[email-masked]>
Date: Wed, 11 May 2005 14:31:48 -0400

Here's the symlink version.  Note, that git does not complain but
simply creates (or
overwrites) the wrong file.

Morten

cd /tmp
mkdir xxx
cd xxx
rm -rf .git dir yyy
mkdir dir
touch dir/empty
cg-init </dev/null
cg-tag initial
mkdir yyy
touch yyy/zzz
cg-add yyy/zzz
cg-commit </dev/null
cg-tag dir
rm -rf yyy
rm -f .git/HEAD
cat .git/refs/tags/initial > .git/HEAD
git-read-tree -m HEAD
git-checkout-cache -f -a
ln -s dir yyy
git-update-cache --add -- yyy
cg-commit </dev/null
cg-tag symlink
# Got that?

# yyy is a symlink right now.
git-read-tree `cat .git/refs/tags/dir`
git-checkout-cache -f -a
ls -l dir
total 0
-rw-rw-r--    1 welinder research        0 May 11 14:20 empty
-rw-rw-r--    1 welinder research        0 May 11 14:26 zzz
# dir/zzz should not exist at ths point!