summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-03-10 11:13:39 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-03-10 11:13:39 -0800
commit8834ea375a404a6c79a6d8cd8cbc9954c6f2847d (patch)
treeb9a108984c7f802519edf68ff4ed6fd3ad97131a /builtin
parentMerge branch 'jk/epipe-in-async' into maint (diff)
parentget_sha1: don't die() on bogus search strings (diff)
downloadtgif-8834ea375a404a6c79a6d8cd8cbc9954c6f2847d.tar.xz
Merge branch 'nd/dwim-wildcards-as-pathspecs' into maint
"git show 'HEAD:Foo[BAR]Baz'" did not interpret the argument as a rev, i.e. the object named by the the pathname with wildcard characters in a tree object. * nd/dwim-wildcards-as-pathspecs: get_sha1: don't die() on bogus search strings check_filename: tighten dwim-wildcard ambiguity checkout: reorder check_filename conditional
Diffstat (limited to 'builtin')
-rw-r--r--builtin/checkout.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index e8110a9243..d53ab75ac9 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -981,7 +981,8 @@ 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) || !no_wildcard(arg)))
recover_with_dwim = 0;
/*
* Accept "git checkout foo" and "git checkout foo --"