logo

etc_portage

Unnamed repository; edit this file 'description' to name the repository. git clone https://hacktivis.me/git/etc_portage.git

0001-fix-compile-libgit2-0.28-changed-giterr_last-to-git_.patch (1691B)


  1. From 583c44395ccc0e052c8db5217bd51fc21f7ffbb7 Mon Sep 17 00:00:00 2001
  2. From: Hiltjo Posthuma <hiltjo@codemadness.org>
  3. Date: Sun, 3 Feb 2019 15:24:34 +0100
  4. Subject: [PATCH 01/22] fix compile: libgit2 0.28 changed giterr_last to
  5. git_error_last
  6. libgit2 commit:
  7. https://github.com/libgit2/libgit2/commit/a27a4de6f8003961d38958893c6c637395c7cc04
  8. ---
  9. stagit-index.c | 4 +---
  10. stagit.c | 4 +---
  11. 2 files changed, 2 insertions(+), 6 deletions(-)
  12. diff --git a/stagit-index.c b/stagit-index.c
  13. index e019793..ab47e48 100644
  14. --- a/stagit-index.c
  15. +++ b/stagit-index.c
  16. @@ -147,7 +147,6 @@ err:
  17. int
  18. main(int argc, char *argv[])
  19. {
  20. - const git_error *e = NULL;
  21. FILE *fp;
  22. char path[PATH_MAX], repodirabs[PATH_MAX + 1];
  23. const char *repodir;
  24. @@ -174,8 +173,7 @@ main(int argc, char *argv[])
  25. if (git_repository_open_ext(&repo, repodir,
  26. GIT_REPOSITORY_OPEN_NO_SEARCH, NULL)) {
  27. - e = giterr_last();
  28. - fprintf(stderr, "%s: %s\n", argv[0], e->message);
  29. + fprintf(stderr, "%s: cannot open repository\n", argv[0]);
  30. ret = 1;
  31. continue;
  32. }
  33. diff --git a/stagit.c b/stagit.c
  34. index 093cdab..c2b2f2c 100644
  35. --- a/stagit.c
  36. +++ b/stagit.c
  37. @@ -1054,7 +1054,6 @@ main(int argc, char *argv[])
  38. {
  39. git_object *obj = NULL;
  40. const git_oid *head = NULL;
  41. - const git_error *e = NULL;
  42. mode_t mask;
  43. FILE *fp, *fpread;
  44. char path[PATH_MAX], repodirabs[PATH_MAX + 1], *p;
  45. @@ -1101,8 +1100,7 @@ main(int argc, char *argv[])
  46. if (git_repository_open_ext(&repo, repodir,
  47. GIT_REPOSITORY_OPEN_NO_SEARCH, NULL) < 0) {
  48. - e = giterr_last();
  49. - fprintf(stderr, "%s: %s\n", argv[0], e->message);
  50. + fprintf(stderr, "%s: cannot open repository\n", argv[0]);
  51. return 1;
  52. }
  53. --
  54. 2.26.2