summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-02-24 21:25:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-02-24 21:25:52 (GMT)
commite6a6a768ca472afed90adbbd786e5c04fff6be7b (patch)
tree24e3f08992b8d7135cf703a013c591f41018757b /builtin
parent7c0da37d7b0e09c199788191b322bf45fd003e3c (diff)
parentaac4fac1689f7d1414523d2ac96f1c737ee53b71 (diff)
downloadgit-e6a6a768ca472afed90adbbd786e5c04fff6be7b.zip
git-e6a6a768ca472afed90adbbd786e5c04fff6be7b.tar.gz
git-e6a6a768ca472afed90adbbd786e5c04fff6be7b.tar.bz2
Merge branch 'nd/dwim-wildcards-as-pathspecs'
"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 5af84a3..cfa66e2 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -982,7 +982,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 --"