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

How to detect if something is a repo #47

Open
nomeata opened this issue May 17, 2015 · 1 comment
Open

How to detect if something is a repo #47

nomeata opened this issue May 17, 2015 · 1 comment
Labels

Comments

@nomeata
Copy link

nomeata commented May 17, 2015

Hi,

I’d like to check if a given directory is a git repository, and if so, if it is a bare repository. Can do I do that using gitlib / gitlib-libgit2?

Thanks,
Joachim

@jwiegley
Copy link
Owner

Hi @nomeata! You could try to open it as a repository and see if it fails, but other than that, I'd use regular filesystem features as you might in a shell script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants