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

Clean up _git_toplevel() #1105

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

Clean up _git_toplevel() #1105

wants to merge 1 commit into from

Conversation

rossburton
Copy link

Instead of asking git what the relative path of the current directory is from the root of the repository and then reverse-engineering the root, simply call git rev-parse --show-toplevel.

This option was added in git 1.7.0 back in 2010, so I think it's fair to assume it exists.

Instead of asking git what the relative path of the current directory is
from the root of the repository and then reverse-engineering the root,
simply call git rev-parse --show-toplevel.

This option was added in git 1.7.0 back in 2010, so I think it's fair to
assume it exists.
@rossburton
Copy link
Author

Love it when a test suite works locally but fails in CI.

@RonnyPfannschmidt
Copy link
Contributor

I vaguely recall pain and suffering from windows path normalization

It may be necessary to keep the cutoff of the tailing slashes and to use normalization

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.

2 participants