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

refactor: add root command to get the root of the current repository #94

Merged
merged 1 commit into from
May 29, 2024

Conversation

AdeAttwood
Copy link
Collaborator

@AdeAttwood AdeAttwood commented May 13, 2024

refactor: add root command to get the root of the current repository

Summary:

Right now in our git hooks we are using git rev-parse --show-toplevel to get
the root of the repository. This is not working within a sapling repo.

This implements the root command so we can use that instead. It as a new root
method to the SourceControlProvider interface. This will then be implemented
by any provider we want to.

Test Plan:

No real way to test this other than running the command and checking the
output. As long as the hooks commands will be working for us this will be fine
for now.


Stack created with Sapling. Best reviewed with ReviewStack.

Base automatically changed from pr93 to 2.x May 29, 2024 20:01
Summary:

Right now in our git hooks we are using `git rev-parse --show-toplevel` to get
the root of the repository. This is not working within a sapling repo.

This implements the root command so we can use that instead. It as a new `root`
method to the `SourceControlProvider` interface. This will then be implemented
by any provider we want to.

Test Plan:

No real way to test this other than running the command and checking the
output. As long as the hooks commands will be working for us this will be fine
for now.
@AdeAttwood AdeAttwood merged commit 608d3e2 into 2.x May 29, 2024
6 checks passed
@AdeAttwood AdeAttwood deleted the pr94 branch May 29, 2024 20:03
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