If a file is referenced from the subdir of a repository, the script confirms it exists and tacks the filename onto the URL, but doesn't check if the filename provided is relative to the repo root.
I couldn't immediately work out the best way to update the tests to:
Create a temp dir inside the existing temp repo
Create a new temp file within that new dir
Change CWD to the new dir
Run git-browse on that new file with a relative path
If a file is referenced from the subdir of a repository, the script confirms it exists and tacks the filename onto the URL, but doesn't check if the filename provided is relative to the repo root.
I couldn't immediately work out the best way to update the tests to: