]> git.armaanb.net Git - stagit.git/commitdiff
fix compile: libgit2 0.28 changed giterr_last to git_error_last
authorHiltjo Posthuma <hiltjo@codemadness.org>
Sun, 3 Feb 2019 14:24:34 +0000 (15:24 +0100)
committerHiltjo Posthuma <hiltjo@codemadness.org>
Sat, 16 Feb 2019 20:17:38 +0000 (21:17 +0100)
libgit2 commit:
https://github.com/libgit2/libgit2/commit/a27a4de6f8003961d38958893c6c637395c7cc04

stagit-index.c
stagit.c

index e019793a3c566aa2f1839d38684511b6be23c0eb..ab47e4877139fba415d5d608490123069adbb862 100644 (file)
@@ -147,7 +147,6 @@ err:
 int
 main(int argc, char *argv[])
 {
-       const git_error *e = NULL;
        FILE *fp;
        char path[PATH_MAX], repodirabs[PATH_MAX + 1];
        const char *repodir;
@@ -174,8 +173,7 @@ main(int argc, char *argv[])
 
                if (git_repository_open_ext(&repo, repodir,
                    GIT_REPOSITORY_OPEN_NO_SEARCH, NULL)) {
-                       e = giterr_last();
-                       fprintf(stderr, "%s: %s\n", argv[0], e->message);
+                       fprintf(stderr, "%s: cannot open repository\n", argv[0]);
                        ret = 1;
                        continue;
                }
index 093cdabb1c8ea7aac953e590522e61b7602192d8..c2b2f2cb7c48c7ec0932f35b587cd1faea14a30d 100644 (file)
--- a/stagit.c
+++ b/stagit.c
@@ -1054,7 +1054,6 @@ main(int argc, char *argv[])
 {
        git_object *obj = NULL;
        const git_oid *head = NULL;
-       const git_error *e = NULL;
        mode_t mask;
        FILE *fp, *fpread;
        char path[PATH_MAX], repodirabs[PATH_MAX + 1], *p;
@@ -1101,8 +1100,7 @@ main(int argc, char *argv[])
 
        if (git_repository_open_ext(&repo, repodir,
                GIT_REPOSITORY_OPEN_NO_SEARCH, NULL) < 0) {
-               e = giterr_last();
-               fprintf(stderr, "%s: %s\n", argv[0], e->message);
+               fprintf(stderr, "%s: cannot open repository\n", argv[0]);
                return 1;
        }