Re: [PATCH] sha1_name(): accept ':directory/' to get at the cache_tree
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Dec 22, 2006, 12:18 UTC
- Message-ID
- <Pine.LNX.4.63.0612221316550.19693@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <20061222084425.GA4644@steel.home>
Hi,
On Fri, 22 Dec 2006, Alex Riesen wrote:
Show 18 quoted lines
> Johannes Schindelin, Fri, Dec 22, 2006 03:19:21 +0100: > > > > If the cache tree is not up-to-date, it will be updated first. So, now > > > > $ git show :Documentation/ > > > > will in effect show what files/directories are in the index' version > > of the directory Documentation. The three commands > > > > $ git show :./ > > $ git show :. > > $ git show : > > > > are all equivalent and show the index' idea of the root directory. > > That is a bit unexpected if you're not in the root directory of > repository, but in some subdir of the working directory. > Why root? Why not the current directory relative to root?
Why root? Because you are not asking for the working directory. Use "ls" for that. You are asking for the index. If you git-show a commit, you don't expect the output to be restricted by the subdirectory you're in, either, right?
CIao, Dscho