stagit

fix compile: libgit2 0.28 changed giterr_last to git_error_last

libgit2 commit:
https://github.com/libgit2/libgit2/commit/a27a4de6f8003961d38958893c6c637395c7cc04

Hiltjo Posthuma contact@arjunchoudhary.com

commit: 6398888 parent: ac8cfca
2 files changed, 2 insertions(+), 6 deletions(-)
Mstagit-index.c+1-3
Mstagit.c+1-3
M · stagit-index.c +1, -3
 1@@ -147,7 +147,6 @@ err:
 2 int
 3 main(int argc, char *argv[])
 4 {
 5-	const git_error *e = NULL;
 6 	FILE *fp;
 7 	char path[PATH_MAX], repodirabs[PATH_MAX + 1];
 8 	const char *repodir;
 9@@ -174,8 +173,7 @@ main(int argc, char *argv[])
10 
11 		if (git_repository_open_ext(&repo, repodir,
12 		    GIT_REPOSITORY_OPEN_NO_SEARCH, NULL)) {
13-			e = giterr_last();
14-			fprintf(stderr, "%s: %s\n", argv[0], e->message);
15+			fprintf(stderr, "%s: cannot open repository\n", argv[0]);
16 			ret = 1;
17 			continue;
18 		}
M · stagit.c +1, -3
 1@@ -1054,7 +1054,6 @@ main(int argc, char *argv[])
 2 {
 3 	git_object *obj = NULL;
 4 	const git_oid *head = NULL;
 5-	const git_error *e = NULL;
 6 	mode_t mask;
 7 	FILE *fp, *fpread;
 8 	char path[PATH_MAX], repodirabs[PATH_MAX + 1], *p;
 9@@ -1101,8 +1100,7 @@ main(int argc, char *argv[])
10 
11 	if (git_repository_open_ext(&repo, repodir,
12 		GIT_REPOSITORY_OPEN_NO_SEARCH, NULL) < 0) {
13-		e = giterr_last();
14-		fprintf(stderr, "%s: %s\n", argv[0], e->message);
15+		fprintf(stderr, "%s: cannot open repository\n", argv[0]);
16 		return 1;
17 	}
18