Re: [RFH/PATCH] prefix_path(): disallow absolute paths
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 29, 2008, 08:31 UTC
- Message-ID
- <7vprvlowwg.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <479ED92E.4020709@viscovery.net>
Johannes Sixt <j.sixt@viscovery.net> writes:
Show 5 quoted lines
> 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.
Show 6 quoted lines
>> 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.