From 39930dbd17093fe6f988395ce858164b571a7bc7 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 5 Mar 2017 14:27:57 +0000 Subject: Initial fetch options in a way that doesn't produce a warning --- gentoobrowse-api/service/utils/git.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gentoobrowse-api/service/utils/git.cpp b/gentoobrowse-api/service/utils/git.cpp index 5eae2a6..1dd3653 100644 --- a/gentoobrowse-api/service/utils/git.cpp +++ b/gentoobrowse-api/service/utils/git.cpp @@ -29,7 +29,7 @@ namespace Gentoo { std::unique_ptr gitFetch(git_repository * repo, git_remote * remote, const char * remoteBranchName) { - git_fetch_options opts = GIT_FETCH_OPTIONS_INIT; + auto opts = gitSafeGet(git_fetch_init_options, GIT_FETCH_OPTIONS_VERSION); opts.prune = GIT_FETCH_PRUNE; opts.update_fetchhead = 1; auto localBranch = gitSafeGet(git_repository_head, git_reference_free, repo); -- cgit v1.2.3