Skip to content

Commit 5845175

Browse files
punkymaniacethomson
authored andcommitted
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.
1 parent ffead01 commit 5845175

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/worktree.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,6 @@ int git_worktree_add(git_worktree **out, git_repository *repo,
407407
/* Checkout worktree's HEAD */
408408
if (opts != NULL)
409409
memcpy(&coopts, &wtopts.checkout_opts, sizeof(coopts));
410-
else
411-
coopts.checkout_strategy = GIT_CHECKOUT_FORCE;
412410
if ((err = git_checkout_head(wt, &coopts)) < 0)
413411
goto out;
414412

0 commit comments

Comments
 (0)