Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use absolute (relative to repo root) path to supplied filename #1152

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mattcen
Copy link

@mattcen mattcen commented Aug 8, 2024

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:

  1. Create a temp dir inside the existing temp repo
  2. Create a new temp file within that new dir
  3. Change CWD to the new dir
  4. 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant