stagit

static git page generator  https://git.ce9e.org
git clone https://git.ce9e.org/stagit.git

commit
583c44395ccc0e052c8db5217bd51fc21f7ffbb7
parent
9ad1cb6e42096a8e1f8663bc0968bb7ea49a5052
Author
Hiltjo Posthuma <hiltjo@codemadness.org>
Date
2019-02-03 14:24
fix compile: libgit2 0.28 changed giterr_last to git_error_last

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

Diffstat

M stagit-index.c 4 +---
M stagit.c 4 +---

2 files changed, 2 insertions, 6 deletions


diff --git a/stagit-index.c b/stagit-index.c

@@ -147,7 +147,6 @@ err:
  147   147 int
  148   148 main(int argc, char *argv[])
  149   149 {
  150    -1 	const git_error *e = NULL;
  151   150 	FILE *fp;
  152   151 	char path[PATH_MAX], repodirabs[PATH_MAX + 1];
  153   152 	const char *repodir;
@@ -174,8 +173,7 @@ main(int argc, char *argv[])
  174   173 
  175   174 		if (git_repository_open_ext(&repo, repodir,
  176   175 		    GIT_REPOSITORY_OPEN_NO_SEARCH, NULL)) {
  177    -1 			e = giterr_last();
  178    -1 			fprintf(stderr, "%s: %s\n", argv[0], e->message);
   -1   176 			fprintf(stderr, "%s: cannot open repository\n", argv[0]);
  179   177 			ret = 1;
  180   178 			continue;
  181   179 		}

diff --git a/stagit.c b/stagit.c

@@ -1054,7 +1054,6 @@ main(int argc, char *argv[])
 1054  1054 {
 1055  1055 	git_object *obj = NULL;
 1056  1056 	const git_oid *head = NULL;
 1057    -1 	const git_error *e = NULL;
 1058  1057 	mode_t mask;
 1059  1058 	FILE *fp, *fpread;
 1060  1059 	char path[PATH_MAX], repodirabs[PATH_MAX + 1], *p;
@@ -1101,8 +1100,7 @@ main(int argc, char *argv[])
 1101  1100 
 1102  1101 	if (git_repository_open_ext(&repo, repodir,
 1103  1102 		GIT_REPOSITORY_OPEN_NO_SEARCH, NULL) < 0) {
 1104    -1 		e = giterr_last();
 1105    -1 		fprintf(stderr, "%s: %s\n", argv[0], e->message);
   -1  1103 		fprintf(stderr, "%s: cannot open repository\n", argv[0]);
 1106  1104 		return 1;
 1107  1105 	}
 1108  1106