summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
Diffstat (limited to 'builtin')
-rw-r--r--builtin/checkout.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 3e141fc..d34f58e 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -965,7 +965,7 @@ static int parse_branchname_arg(int argc, const char **argv,
*/
int recover_with_dwim = dwim_new_local_branch_ok;
- if (check_filename(NULL, arg) && !has_dash_dash)
+ if (!has_dash_dash && check_filename(NULL, arg))
recover_with_dwim = 0;
/*
* Accept "git checkout foo" and "git checkout foo --"