Fix edit link when base URL has a path
On a setup having a path prefix such as `/r` the edit link woud be
broken because the prefix is stripped.
The reason is `URI.resolve()` is given an absolute path which strip the
path from the base URI:
jshell> new URI("https://example.org/r").resolve("/admin/repos/edit");
^^
$2 ==> https://example.org/admin/repos/edit
^^^____oops
Which is consistent with python `os.path`:
>>> os.path.join('https://example.org/r', '/admin/repos/edit');
'/admin/repos/edit'
Remove the leading slash from the edit URI and update the test with the
proper expected value.
Bug: https://phabricator.wikimedia.org/T405481
Change-Id: I98e9d89cbc4850270f81b52665f2c8849f25c879
Gitiles is a simple repository browser for Git repositories, built on JGit. Its guiding principle is simplicity: it has no formal access controls, no write access, no fancy Javascript, etc.
Gitiles automatically renders *.md Markdown files into HTML for simplified documentation. Refer to the Markdown documentation for details.
Gitiles is configurable in a git-style configuration file named gitiles.config. Refer to the configuration documentation for details.
Use gerrit's issue tracker to file bugs.
Please refer to the Developer Guide.