[geany/geany-plugins] 37aa25: git-changebar: Add support for libgit2 >= 0.23
Colomban Wendling
git-noreply at xxxxx
Thu Sep 10 12:29:14 UTC 2015
Branch: refs/heads/master
Author: Colomban Wendling <ban at herbesfolles.org>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Thu, 10 Sep 2015 12:29:14 UTC
Commit: 37aa25a1a4508c3d7559c0a2d00663b9c8d322c6
https://github.com/geany/geany-plugins/commit/37aa25a1a4508c3d7559c0a2d00663b9c8d322c6
Log Message:
-----------
git-changebar: Add support for libgit2 >= 0.23
Closes #283.
Modified Paths:
--------------
git-changebar/src/gcb-plugin.c
Modified: git-changebar/src/gcb-plugin.c
12 lines changed, 11 insertions(+), 1 deletions(-)
===================================================================
@@ -36,6 +36,15 @@
# define git_libgit2_init git_threads_init
# define git_libgit2_shutdown git_threads_shutdown
#endif
+#if ! defined (LIBGIT2_SOVERSION) || LIBGIT2_SOVERSION < 23
+/* 0.23 added @p binary_cb */
+# define git_diff_buffers(old_buffer, old_len, old_as_path, \
+ new_buffer, new_len, new_as_path, options, \
+ file_cb, binary_cb, hunk_cb, line_cb, payload) \
+ git_diff_buffers (old_buffer, old_len, old_as_path, \
+ new_buffer, new_len, new_as_path, options, \
+ file_cb, hunk_cb, line_cb, payload)
+#endif
GeanyPlugin *geany_plugin;
@@ -656,7 +665,8 @@ diff_buf_to_doc (const git_buf *old_buf,
opts.flags = GIT_DIFF_FORCE_TEXT;
ret = git_diff_buffers (old_buf->ptr, old_buf->size, NULL,
- buf, len, NULL, &opts, NULL, hunk_cb, NULL, payload);
+ buf, len, NULL, &opts, NULL, NULL, hunk_cb, NULL,
+ payload);
if (free_buf) {
g_free (buf);
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Plugins-Commits
mailing list