From 3f2ba517e45eda6b23c7f471fdf6dda2397447a7 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Mon, 3 Apr 2023 17:50:11 +0200 Subject: [PATCH] Set the checkout strategy to 'force' in GuiThemeDownloader to overwrite local changes if there are conflicts --- es-app/src/guis/GuiThemeDownloader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/es-app/src/guis/GuiThemeDownloader.cpp b/es-app/src/guis/GuiThemeDownloader.cpp index 6cdf4cb87..c56a63c95 100644 --- a/es-app/src/guis/GuiThemeDownloader.cpp +++ b/es-app/src/guis/GuiThemeDownloader.cpp @@ -244,7 +244,7 @@ bool GuiThemeDownloader::fetchRepository(const std::string& repositoryName, bool #else git_checkout_options checkoutOptions = GIT_CHECKOUT_OPTIONS_INIT; #endif - checkoutOptions.checkout_strategy = GIT_CHECKOUT_SAFE; + checkoutOptions.checkout_strategy = GIT_CHECKOUT_FORCE; errorCode = git_checkout_tree(repository, object, &checkoutOptions); errorCode = git_repository_set_head(repository, branchName.c_str()); @@ -334,7 +334,7 @@ bool GuiThemeDownloader::fetchRepository(const std::string& repositoryName, bool #else git_checkout_options checkoutOptions = GIT_CHECKOUT_OPTIONS_INIT; #endif - checkoutOptions.checkout_strategy = GIT_CHECKOUT_SAFE; + checkoutOptions.checkout_strategy = GIT_CHECKOUT_FORCE; git_checkout_tree(repository, object, &checkoutOptions); errorCode = git_reference_set_target(&newTargetRef, oldTargetRef, objectID, nullptr); @@ -1261,7 +1261,7 @@ bool GuiThemeDownloader::cloneRepository(const std::string& repositoryName, cons git_clone_options cloneOptions = GIT_CLONE_OPTIONS_INIT; #endif - cloneOptions.checkout_opts.checkout_strategy = GIT_CHECKOUT_SAFE; + cloneOptions.checkout_opts.checkout_strategy = GIT_CHECKOUT_FORCE; cloneOptions.fetch_opts.callbacks.transfer_progress = fetchProgressFunc; mReceivedObjectsProgress = 0.0f;