summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpunkymaniac <punkymaniac@protonmail.ch>2021-10-14 09:55:00 +0200
committerEdward Thomson <ethomson@edwardthomson.com>2021-12-23 14:21:49 -0600
commit58451759c2fd728149aad6dc91cb0c3e774f68c7 (patch)
treeef72b3a25c782868272215d70666db7fbebe4304
parentffead012283cec68cafb3441e4be55030c94de74 (diff)
downloadlibgit2-58451759c2fd728149aad6dc91cb0c3e774f68c7.tar.gz
Change default checkout strategy from FORCE to SAFE
Since we are able to give our own git checkout options, the default git checkout strategy will be the same as initialized in a new git_checkout_options struct.
-rw-r--r--src/worktree.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/worktree.c b/src/worktree.c
index caf4c58ed..6bf604227 100644
--- a/src/worktree.c
+++ b/src/worktree.c
@@ -407,8 +407,6 @@ int git_worktree_add(git_worktree **out, git_repository *repo,
/* Checkout worktree's HEAD */
if (opts != NULL)
memcpy(&coopts, &wtopts.checkout_opts, sizeof(coopts));
- else
- coopts.checkout_strategy = GIT_CHECKOUT_FORCE;
if ((err = git_checkout_head(wt, &coopts)) < 0)
goto out;