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

Throw more helpful exception when directory not a git repository #2275

Merged
merged 1 commit into from
Mar 16, 2019

Conversation

csmager
Copy link
Contributor

@csmager csmager commented Mar 14, 2019

When findGitDir reaches the root folder having not found a .git directory, we throw an InvalidOperationException with the message:

"Not a git repository: no .git directory found in the specified directory or any parent directory."

This should be a little more helpful than the previous NullReferenceException, but doesn't change the API.

Fixes #2249

@matthid
Copy link
Member

matthid commented Mar 16, 2019

Thanks a lot! Looks good to me.

@matthid matthid merged commit 9134ce4 into fsprojects:release/next Mar 16, 2019
@csmager csmager deleted the find-git-dir branch March 16, 2019 18:09
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