Re: log/show: relative pathnames do not work in rev:path
- From
- Dana How <danahow@gmail.com>
- Date
- Dec 18, 2007, 23:03 UTC
- Message-ID
- <56b7f5510712181503l1e5dcacds23511d968f98aedb@mail.gmail.com>
- In-Reply-To
- <Pine.LNX.4.64.0712182239500.23902@racer.site>
On Dec 18, 2007 2:43 PM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 21 quoted lines
> On Tue, 18 Dec 2007, Alex Riesen wrote: > > 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.
Both of your counterexamples use 2 disjoint directory trees: C: vs D:, or trees on different machines.
The cases we are talking about are all subtrees of the working tree. There is a useful cwd suffix.
Don't you think that git <op> commit:./file.c could occasionally be more convenient than git <op> commit:very/long/and/boring/path/equal/to/cwd/file.c ?
Thanks,
-- Dana L. How danahow@gmail.com +1 650 804 5991 cell