suppress meaningless error codes when a repo can't be opened (similar to stagit-index)

This commit is contained in:
Hiltjo Posthuma 2016-04-29 16:39:33 +02:00
parent bc7515e2dc
commit 671f4e9100

View file

@ -893,7 +893,7 @@ main(int argc, char *argv[])
if ((status = git_repository_open_ext(&repo, repodir,
GIT_REPOSITORY_OPEN_NO_SEARCH, NULL)) < 0) {
e = giterr_last();
fprintf(stderr, "error %d/%d: %s\n", status, e->klass, e->message);
fprintf(stderr, "%s: %s\n", argv[0], e->message);
return status;
}