From 3eaf4567fa7756190da16e9caf3197405c31d298 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Fri, 5 Aug 2016 08:41:33 -0300 Subject: [PATCH] eeshow/git-hist.c (vcs_git_try): ignore repo if empty or corrupted --- eeshow/git-hist.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eeshow/git-hist.c b/eeshow/git-hist.c index 21681a0..53e66c5 100644 --- a/eeshow/git-hist.c +++ b/eeshow/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); }