summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--git-hist.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/git-hist.c b/git-hist.c
index 21681a0..53e66c5 100644
--- a/git-hist.c
+++ b/git-hist.c
@@ -132,8 +132,10 @@ bool vcs_git_try(const char *path)
vcs_git_init();
- return !git_repository_open_ext(&repo, path,
- GIT_REPOSITORY_OPEN_CROSS_FS, NULL);
+ if (git_repository_open_ext(&repo, path,
+ GIT_REPOSITORY_OPEN_CROSS_FS, NULL))
+ return 0;
+ return !git_repository_is_empty(repo);
}