From: Jakub Narebski Date: Tue, 18 Dec 2007 23:11:52 GMT Subject: Re: log/show: relative pathnames do not work in rev:path Message-ID: <200712190011.52613.jnareb@gmail.com> In-Reply-To: Johannes Schindelin wrote: > On Tue, 18 Dec 2007, Alex Riesen wrote: >> Jakub Narebski, Tue, Dec 18, 2007 22:24:26 +0100: >>> >>> What cwd? in : syntax is "relative" to >>> . >> >> But the act of running "git-show :" does have a working >> directory relative to the project root. > > Not necessarily. My primary use of "git show :" (yes, I > already use the dash-less form ;-) is in _bare_ repositories. > > And I still maintain that expecting : 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 :, by default is relative to the login (ssh) directory on . In git's :, by default is relative to . 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. :./. -- Jakub Narebski Poland