From 77dae89b90eda203c5f418a64d2b3abf2e15e755 Mon Sep 17 00:00:00 2001 From: Gaetan Bisson Date: Sun, 14 Jun 2015 17:02:42 -1000 Subject: 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 Signed-off-by: Dirk Hohndel --- git-access.c | 7 +++++++ 1 file changed, 7 insertions(+) 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 */ -- cgit v1.2.3-70-g09d2