Subject: Re: [RFH/PATCH] prefix_path(): disallow absolute paths

From: Junio C Hamano <[email-masked]>
Date: Tue, 29 Jan 2008 00:31:43 -0800

Johannes Sixt <[email-masked]> writes:

> The #ifdef I'm addressing above is one that we had to introduce because in
> the old implementation of prefix_path() on Windows we had to rewrite the
> path more often than on *nix due to '\\' => '/' conversion. In your new
> implementation this rewriting now always takes place, but on *nix it more
> often turns out to be an identity operation.

I am not sure what you mean by "\\" => '/', but you are right.
We should be able to optimize the common case of prefix=none and
no special path components found in path, which should be an
identity function.

>> Especially I have no idea how would that drive lettter stuff
>> would/should work.  When you are in C:\Documents\Panda\, how
>> would you express D:\Movie\Porn\My Favorite.mpg as a relative
>> path?
>
> You can't. But when would this be necessary?

I don't know.  That's why I asked.