diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-09-01 01:49:50 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-09-01 01:49:50 +0300 |
commit | c57afd73efcf0df974515eb97a6b1ee375107c71 (patch) | |
tree | 207740f901e4e38324120cedccb12f16db47be68 /builtin | |
parent | b9ccc5e2b445c048b2165eef0cde103eb00c1673 (diff) | |
parent | bfda204ade8a19357cf073c98dc3a5043533b4c4 (diff) |
Merge branch 'rs/checkout-no-overlay-pathspec-fix'
"git restore/checkout --no-overlay" with wildcarded pathspec
mistakenly removed matching paths in subdirectories, which has been
corrected.
* rs/checkout-no-overlay-pathspec-fix:
checkout, restore: make pathspec recursive
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/checkout.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c index bba64108af..6ec82097a2 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -1709,6 +1709,8 @@ static int checkout_main(int argc, const char **argv, const char *prefix, die(_("--pathspec-file-nul requires --pathspec-from-file")); } + opts->pathspec.recursive = 1; + if (opts->pathspec.nr) { if (1 < !!opts->writeout_stage + !!opts->force + !!opts->merge) die(_("git checkout: --ours/--theirs, --force and --merge are incompatible when\n" |