I've started using LibGit2Sharp in my project and I have to admit its pretty awesome. I'm glad i didnt go the command line route with processinfo. But I have a question which I couldn't find an answer for in the wiki and could not find a test in the source code that had it. How can you check with LibGit2Sharp if a folder is a git repository?
Asked
Active
Viewed 3,964 times
1 Answers
10
You can call Repository.IsValid(path)
. The source code for Repository
is here.
The path can be either to the .git
folder or to the working directory.

Matze
- 5,100
- 6
- 46
- 69

Matthew Strawbridge
- 19,940
- 10
- 72
- 93