summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2017-03-05 14:27:57 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2017-03-05 14:27:57 +0000
commit39930dbd17093fe6f988395ce858164b571a7bc7 (patch)
tree857151f75e98904d22d7fe8302cf8ac4db9d8abc
parentRemove experimental commented out fetch code (diff)
downloadgentoobrowse-api-39930dbd17093fe6f988395ce858164b571a7bc7.tar.bz2
gentoobrowse-api-39930dbd17093fe6f988395ce858164b571a7bc7.tar.xz
gentoobrowse-api-39930dbd17093fe6f988395ce858164b571a7bc7.zip
Initial fetch options in a way that doesn't produce a warning
-rw-r--r--gentoobrowse-api/service/utils/git.cpp2
1 files changed, 1 insertions, 1 deletions
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<git_annotated_commit, void (*)(git_annotated_commit*)>
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);