diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-05-28 21:43:32 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-05-28 21:43:32 -0700 |
commit | 29e7459d6bd922043eb0d6ed0445d28e2f6ed10f (patch) | |
tree | 1d84335ecf7671533a1a84f5f22647db4c78326f | |
parent | 64ba7f8683dd2e766fc5960e75b2f7e0147f4e50 (diff) | |
download | subsurface-29e7459d6bd922043eb0d6ed0445d28e2f6ed10f.tar.gz |
Remote storage: second attempt to fix build with older libgit2
That was embarrassing...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | git-access.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/git-access.c b/git-access.c index c63f933d8..60607fa7b 100644 --- a/git-access.c +++ b/git-access.c @@ -108,12 +108,14 @@ static git_repository *update_local_repo(const char *localdir, const char *remot } // NOTE! A fetch error is not fatal, we just report it - git_fetch_options opts = GIT_FETCH_OPTIONS_INIT; #if USE_LIBGIT23_API + git_fetch_options opts = GIT_FETCH_OPTIONS_INIT; if (strncmp(remote, "ssh://", 6) == 0) opts.callbacks.credentials = credential_cb; -#endif error = git_remote_fetch(origin, NULL, &opts, NULL); +#else + error = git_remote_fetch(origin, NULL, NULL, NULL); +#endif git_remote_free(origin); if (error) { report_error("Unable to update cache for remote '%s'", remote); |