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
commitb25f3bd1fc334b5b1a92da450b96d51d13ac1baf (patch)
tree857151f75e98904d22d7fe8302cf8ac4db9d8abc
parentRemove experimental commented out fetch code (diff)
downloadgentoobrowse-api-b25f3bd1fc334b5b1a92da450b96d51d13ac1baf.tar.bz2
gentoobrowse-api-b25f3bd1fc334b5b1a92da450b96d51d13ac1baf.tar.xz
gentoobrowse-api-b25f3bd1fc334b5b1a92da450b96d51d13ac1baf.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);