From: Alex Riesen Date: Tue, 18 Dec 2007 22:29:55 GMT Subject: Re: log/show: relative pathnames do not work in rev:path Message-ID: <20071218222955.GI2875@steel.home> In-Reply-To: <56b7f5510712181408g4aee55d2j2a7f0f13bf90323d@mail.gmail.com> Dana How, Tue, Dec 18, 2007 23:08:33 +0100: > When it *does* refer to a commit, then for commit:relpath you prefix > relpath with the suffix of the cwd which is an extension beyond the root > of the working tree. ...universally known as "prefix" (the last argument of builtin commands) :) > > where the magic is *not* done by any "SHA1 path lookup" at all, but is > > simply done by the commit->tree lookup. At least at that point it would > > make logical sense (although it would probably be quite painful to > > implement). > > I must be missing something. The old patch I submitted did this. > Its defect was that it did NOT make the cwd insertion conditional > on whether the tree-ish involved a commit or not (a test which also > _seems_ doable, but I don't think I finished it & sent it in). It is also a bit painful: lots of funtions (sha1_name.c) will have their prototypes changed to get the prefix (aka suffix). And their callers...