summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/repository.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/repository.c b/src/repository.c
index c12df25c3..b9d180da4 100644
--- a/src/repository.c
+++ b/src/repository.c
@@ -777,8 +777,8 @@ static int repo_init_config(
SET_REPO_CONFIG(string, "core.worktree", work_dir);
}
else if ((opts->flags & GIT_REPOSITORY_INIT__IS_REINIT) != 0) {
- if ((error = git_config_delete(config, "core.worktree")) < 0)
- goto cleanup;
+ if (git_config_delete(config, "core.worktree") < 0)
+ giterr_clear();
}
} else {
if (!are_symlinks_supported(repo_dir))