libgit2-version.patch 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. commit 67a717dc057a5936ae1f5820fc6c470524213b97
  2. Author: Dirk Hohndel <dirk@hohndel.org>
  3. Date: Thu Apr 9 16:59:12 2020 -0700
  4. cleanup: remove support for ancient versions of libgit2
  5. We require a minimum of libgit2 0.26.
  6. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
  7. diff --git a/INSTALL b/INSTALL
  8. index 52b05cf2b..321c6cef0 100644
  9. --- a/INSTALL
  10. +++ b/INSTALL
  11. @@ -97,7 +97,7 @@ Other third party library dependencies
  12. --------------------------------------
  13. In order for our cloud storage to be fully functional you need
  14. -libgit2 0.23 or newer.
  15. +libgit2 0.26 or newer.
  16. cmake build system
  17. diff --git a/core/git-access.c b/core/git-access.c
  18. index 3688cb90c..982a51cfd 100644
  19. --- a/core/git-access.c
  20. +++ b/core/git-access.c
  21. @@ -359,11 +359,7 @@ static int try_to_git_merge(git_repository *repo, git_reference **local_p, git_r
  22. }
  23. git_merge_init_options(&merge_options, GIT_MERGE_OPTIONS_VERSION);
  24. -#if !LIBGIT2_VER_MAJOR && LIBGIT2_VER_MINOR > 23
  25. merge_options.flags = GIT_MERGE_FIND_RENAMES;
  26. -#else
  27. - merge_options.tree_flags = GIT_MERGE_TREE_FIND_RENAMES;
  28. -#endif
  29. merge_options.file_favor = GIT_MERGE_FILE_FAVOR_UNION;
  30. merge_options.rename_threshold = 100;
  31. if (git_commit_lookup(&local_commit, repo, local_id)) {
  32. diff --git a/core/save-git.c b/core/save-git.c
  33. index a304e0d94..7bf7b2e1d 100644
  34. --- a/core/save-git.c
  35. +++ b/core/save-git.c
  36. @@ -1022,10 +1022,8 @@ int update_git_checkout(git_repository *repo, git_object *parent, git_tree *tree
  37. static int get_authorship(git_repository *repo, git_signature **authorp)
  38. {
  39. -#if LIBGIT2_VER_MAJOR || LIBGIT2_VER_MINOR >= 20
  40. if (git_signature_default(authorp, repo) == 0)
  41. return 0;
  42. -#endif
  43. /* try to fetch the user info from the OS, otherwise use default values. */
  44. struct user_info user = { .name = NULL, .email = NULL };
  45. subsurface_user_info(&user);