"git-checkout-cache -f -a" failure
- From
- Morten Welinder <mwelinder@gmail.com>
- Date
- May 9, 2005, 18:25 UTC
- Message-ID
- <118833cc05050911255e601fc@mail.gmail.com>
git-checkout-cache is having problems when files change from directories to plain files or vice versa. cg-seek seems to be similarly affected.
Note also, that git-checkout-cache's error messages haven't caught up with the command renaming.
Morten
cd /tmp mkdir xxx cd xxx rm -rf .git empty yyy touch 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 empty yyy rm -f .git/HEAD cat .git/refs/tags/initial > .git/HEAD git-read-tree -m HEAD git-checkout-cache -f -a touch yyy cg-add yyy cg-commit </dev/null cg-tag file # Got that?
# yyy is a file right now. git-read-tree `cat .git/refs/tags/dir` git-checkout-cache -f -a # error: checkout-cache: unable to create file yyy/zzz (Not a directory) # Not good!
rm -rf empty yyy git-read-tree `cat .git/refs/tags/dir` git-checkout-cache -f -a
# yyy is a directory right now git-read-tree `cat .git/refs/tags/file` git-checkout-cache -f -a # error: checkout-cache: unable to create file yyy (Is a directory) # Not good!