1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-19 07:01:53 +02:00

eeshow/git-hist.c (vcs_git_try): ignore repo if empty or corrupted

This commit is contained in:
Werner Almesberger 2016-08-05 08:41:33 -03:00
parent dc2b477cf8
commit 3eaf4567fa

View File

@ -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);
}