Re: log/show: relative pathnames do not work in rev:path
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Dec 18, 2007, 22:43 UTC
- Message-ID
- <Pine.LNX.4.64.0712182239500.23902@racer.site>
- In-Reply-To
- <20071218222032.GH2875@steel.home>
Hi,
On Tue, 18 Dec 2007, Alex Riesen wrote:
Show 12 quoted lines
> Jakub Narebski, Tue, Dec 18, 2007 22:24:26 +0100: > > On Tue, 18 Dec 2007, Alex Riesen wrote: > > > > > I think that we have parsing of the blob locators at the wrong > > > level: so that git-show, git-log and git-diff can handle its > > > pathnames as they handle path filters (relative to cwd), > > > > What cwd? <path> in <tree-ish>:<path> syntax is "relative" to > > <tree-ish>. > > But the act of running "git-show <tree-ish>:<path>" does have a working > directory relative to the project root.
Not necessarily. My primary use of "git show <tree-ish>:<path>" (yes, I already use the dash-less form ;-) is in _bare_ repositories.
And I still maintain that expecting <tree-ish>:<path> to take the current relative path into account would be just like if you expected
C:\> cd WINDOWS C:\WINDOWS> dir D:system32
to show you the contents of D:\WINDOWS\system32.
Or another, less Windowsy example:
$ cd /usr/bin $ scp home:bash ./
No, this does not copy home:/usr/bin/bash but home:$HOME/bash.
Hth, Dscho