Re: rc4 - make quick-install-doc is broken
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Aug 4, 2007, 22:37 UTC
- Message-ID
- <Pine.LNX.4.64.0708042328000.14781@racer.site>
- In-Reply-To
- <46B4F923.3090604@lsrfire.ath.cx>
Hi,
your test script is slightly wrong...
First you "git init", with GIT_DIR in $(pwd)/.git, i.e. the default. But then, you need not do this, test scripts are called when git init was already called.
Then you make an untracked directory called untracked/. Tradition dictates that when we're in that directory, we get the prefix "untracked/", because we might add a file, or reference a file in another branch, where that directory is _not_ untracked.
So it is expected that checkout-index and ls-files behave differently in a subdirectory (even if that is currently untracked).
It seems a bit counterintuitive that read-tree succeeds, but really, read-tree is only a commit -> index operation, which should not care about the current prefix. So it is fine.
Checkout-index, instead, is an index -> working tree operation, and for most of these, we care about the current prefix (so that you can say git checkout-index file1, where file1 is in the current directory, which is _not_ the working tree root).
Ciao, Dscho