diff options
Diffstat (limited to 'src/checkout.c')
-rw-r--r-- | src/checkout.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/checkout.c b/src/checkout.c index fed1819aa..d84b46ba7 100644 --- a/src/checkout.c +++ b/src/checkout.c @@ -1360,9 +1360,11 @@ fail: static bool should_remove_existing(checkout_data *data) { - int ignorecase = 0; + int ignorecase; - git_repository__cvar(&ignorecase, data->repo, GIT_CVAR_IGNORECASE); + if (git_repository__cvar(&ignorecase, data->repo, GIT_CVAR_IGNORECASE) < 0) { + ignorecase = 0; + } return (ignorecase && (data->strategy & GIT_CHECKOUT_DONT_REMOVE_EXISTING) == 0); |