Re: "git-checkout-cache -f -a" failure
- From
- Morten Welinder <mwelinder@gmail.com>
- Date
- May 11, 2005, 18:31 UTC
- Message-ID
- <118833cc050511113122e2d17d@mail.gmail.com>
- In-Reply-To
- <7vsm0us5p5.fsf@assigned-by-dhcp.cox.net>
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!