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>
This commit is contained in:
Gaetan Bisson 2015-06-14 17:02:42 -10:00 committed by Dirk Hohndel
parent 60f4b37fab
commit 77dae89b90

View file

@ -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
*/