Re: log/show: relative pathnames do not work in rev:path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Schindelin wrote:
> On Tue, 18 Dec 2007, Alex Riesen wrote:
>> Jakub Narebski, Tue, Dec 18, 2007 22:24:26 +0100:
>>> 
>>> 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
[...]

> 	$ cd /usr/bin
> 	$ scp home:bash ./
> 
> No, this does not copy home:/usr/bin/bash but home:$HOME/bash.

Great example! In scp <machine>:<path>, <path> by default is relative
to the login (ssh) directory on <machine>. In git's <tree-ish>:<path>,
<path> by default is relative to <tree-ish>.

Although Linus argument about thinking that cwd affects translation
from _commit_ sha1 to _tree-ish_ is also sound. Nevertheless I'd rather
have separate syntax for cwd-relative paths, i.e. <commit>:./<relpath>.

-- 
Jakub Narebski
Poland
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux