summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Gaetan Bisson <bisson@archlinux.org>2015-06-14 17:02:42 -1000
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-14 20:49:37 -0700
commit77dae89b90eda203c5f418a64d2b3abf2e15e755 (patch)
treedcac83b306fa0da2fad5e1ce37f17e5288a45e2c
parent60f4b37fabd96a2f7f1d3cb1a8e1885895deb1c2 (diff)
downloadsubsurface-77dae89b90eda203c5f418a64d2b3abf2e15e755.tar.gz
Fix compiling against libgit2-0.22.1
I have no idea whether the semantics is right, this patch was only written so Subsurface compiles against the current stable release of libgit2. [Dirk Hohndel: added an extra conditional so this also compiles with the curl-stream branch needed for https proxy support in libgit2] Signed-off-by: Gaetan Bisson <bisson@archlinux.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--git-access.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/git-access.c b/git-access.c
index 8433f7071..94f12c5ea 100644
--- a/git-access.c
+++ b/git-access.c
@@ -30,6 +30,13 @@
#define git_remote_fetch(remote, refspecs, signature, reflog) git_remote_fetch(remote, signature, reflog)
#endif
#endif
+
+#if !USE_LIBGIT23_API && !LIBGIT2_VER_MAJOR && LIBGIT2_VER_MINOR == 22
+ #define git_remote_push(remote,refspecs,opts) git_remote_push(remote,refspecs,opts,NULL,NULL)
+ #define git_reference_set_target(out,ref,id,log_message) git_reference_set_target(out,ref,id,NULL,log_message)
+ #define git_reset(repo,target,reset_type,checkout_opts) git_reset(repo,target,reset_type,checkout_opts,NULL,NULL)
+#endif
+
/*
* api break introduced in libgit2 master after 0.22 - let's guess this is the v0.23 API
*/