| commit | 97d418e1895740a2ee10eb54e6279ee762aaaa35 | [log] [tgz] |
|---|---|---|
| author | Antoine Musso <hashar@free.fr> | Tue Sep 30 19:35:40 2025 +0200 |
| committer | Antoine Musso <hashar@free.fr> | Tue Sep 30 19:39:56 2025 +0200 |
| tree | c9b12547365b9f6e78ea328d6d3461288393a6ba | |
| parent | b89ae948646625812b308b902a617ea63317a880 [diff] |
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.