Patch Set 4:

I think some tests for "./" style relative URLs are needed as well.

Do you still want to look into implementing the resolution part of it? I have time today to see what the CGit code is doing and mirror the behavior.