1
0
mirror of https://github.com/git/git.git synced 2024-10-21 04:39:25 +02:00
git/builtin
René Scharfe bfda204ade checkout, restore: make pathspec recursive
The pathspec given to git checkout and git restore is used with both
tree_entry_interesting (via read_tree_recursive) and match_pathspec
(via ce_path_match).  The latter effectively only supports recursive
matching regardless of the value of the pathspec flag "recursive",
which is unset here.

That causes different match results for pathspecs with wildcards, and
can lead checkout and restore in no-overlay mode to remove entries
instead of modifying them.  Enable recursive matching for both checkout
and restore to make matching consistent.

Setting the flag in checkout_main() technically also affects git switch,
but since that command doesn't accept pathspecs at all this has no
actual consequence.

Reported-by: Sergii Shkarnikov <sergii.shkarnikov@globallogic.com>
Initial-test-by: Sergii Shkarnikov <sergii.shkarnikov@globallogic.com>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-08-22 13:37:43 -07:00
..
add.c Merge branch 'am/pathspec-f-f-checkout' 2019-12-25 11:21:57 -08:00
am.c Merge branch 'en/merge-recursive-cleanup' 2019-10-15 13:47:59 +09:00
annotate.c
apply.c
archive.c
bisect--helper.c
blame.c Merge branch 'sg/blame-indent-heuristics-is-now-the-default' 2019-12-01 09:04:30 -08:00
branch.c l10n: minor case fix in 'git branch' '--unset-upstream' description 2019-12-09 12:30:55 -08:00
bundle.c bundle-verify: add --quiet 2019-11-11 11:46:29 +09:00
cat-file.c Merge branch 'cc/multi-promisor' 2019-09-18 11:50:09 -07:00
check-attr.c
check-ignore.c treewide: rename 'exclude' methods to 'pattern' 2019-09-05 14:05:12 -07:00
check-mailmap.c
check-ref-format.c
checkout-index.c
checkout.c checkout, restore: make pathspec recursive 2020-08-22 13:37:43 -07:00
clean.c Merge branch 'en/clean-nested-with-ignored' 2019-10-11 14:24:46 +09:00
clone.c Sync with Git 2.24.1 2019-12-09 22:17:55 -08:00
column.c
commit-graph.c test-tool: use 'read-graph' helper 2019-11-13 11:14:16 +09:00
commit-tree.c
commit.c Merge branch 'am/pathspec-from-file' 2019-12-25 11:21:57 -08:00
config.c
count-objects.c
credential.c
describe.c Merge branch 'ew/hashmap' 2019-10-15 13:48:02 +09:00
diff-files.c
diff-index.c
diff-tree.c
diff.c
difftool.c hashmap: remove type arg from hashmap_{get,put,remove}_entry 2019-10-07 10:20:12 +09:00
env--helper.c
fast-export.c Merge branch 'ew/hashmap' 2019-10-15 13:48:02 +09:00
fetch-pack.c
fetch.c Merge branch 'rs/use-skip-prefix-more' 2019-12-06 15:09:22 -08:00
fmt-merge-msg.c Merge branch 'hi/gpg-use-check-signature' 2019-12-10 13:11:45 -08:00
for-each-ref.c
fsck.c fsck: only provide oid/type in fsck_error callback 2019-10-28 14:05:18 +09:00
gc.c Fix spelling errors in code comments 2019-11-10 16:00:54 +09:00
get-tar-commit-id.c
grep.c Merge branch 'cb/pcre2-chartables-leakfix' 2019-10-23 14:43:11 +09:00
hash-object.c
help.c
index-pack.c Merge branch 'bc/object-id-part17' 2019-10-11 14:24:46 +09:00
init-db.c
interpret-trailers.c
log.c Merge branch 'dl/rebase-with-autobase' 2019-12-16 13:08:32 -08:00
ls-files.c Merge branch 'ds/include-exclude' 2019-09-30 13:19:32 +09:00
ls-remote.c
ls-tree.c
mailinfo.c
mailsplit.c
merge-base.c
merge-file.c
merge-index.c
merge-ours.c
merge-recursive.c
merge-tree.c Merge branch 'jk/tree-walk-overflow' 2019-08-22 12:34:10 -07:00
merge.c Merge branch 'tg/stash-refresh-index' 2019-10-07 11:32:53 +09:00
mktag.c
mktree.c
multi-pack-index.c multi-pack-index: add [--[no-]progress] option. 2019-10-23 12:05:06 +09:00
mv.c
name-rev.c name-rev: use skip_prefix() instead of starts_with() 2019-11-27 11:21:18 +09:00
notes.c notes: fix minimum number of parameters to "copy" subcommand 2019-10-18 09:43:10 +09:00
pack-objects.c Fix spelling errors in code comments 2019-11-10 16:00:54 +09:00
pack-redundant.c
pack-refs.c
patch-id.c patch-id: use oid_to_hex() to print multiple object IDs 2019-12-09 12:26:40 -08:00
prune-packed.c
prune.c
pull.c
push.c push: use skip_prefix() instead of starts_with() 2019-11-27 11:18:39 +09:00
range-diff.c range-diff: clear other_arg at end of function 2019-12-06 12:36:53 -08:00
read-tree.c
rebase.c Merge branch 'dl/rebase-with-autobase' 2019-12-16 13:08:32 -08:00
receive-pack.c builtin/receive-pack: replace sha1_to_hex 2019-08-19 15:04:59 -07:00
reflog.c
remote-ext.c
remote-fd.c
remote.c
repack.c Merge branch 'wb/midx-progress' 2019-11-10 18:02:14 +09:00
replace.c Merge branch 'bc/object-id-part17' 2019-10-11 14:24:46 +09:00
rerere.c
reset.c Merge branch 'am/pathspec-from-file' 2019-12-10 13:11:41 -08:00
rev-list.c Merge branch 'rs/dedup-includes' 2019-10-11 14:24:48 +09:00
rev-parse.c rev-parse: make --show-toplevel without a worktree an error 2019-11-20 10:19:58 +09:00
revert.c
rm.c
send-pack.c
shortlog.c
show-branch.c
show-index.c builtin/show-index: replace sha1_to_hex 2019-08-19 15:04:59 -07:00
show-ref.c
stash.c Merge branch 'tg/stash-refresh-index' 2019-12-01 09:04:37 -08:00
stripspace.c
submodule--helper.c Merge branch 'jt/clone-recursesub-ref-advise' 2019-12-10 13:11:43 -08:00
symbolic-ref.c
tag.c
unpack-file.c
unpack-objects.c builtin/unpack-objects.c: show throughput progress 2019-11-20 10:30:18 +09:00
update-index.c Merge branch 'js/update-index-ignore-removal-for-skip-worktree' 2019-11-10 18:02:16 +09:00
update-ref.c
update-server-info.c
upload-archive.c
upload-pack.c
var.c
verify-commit.c
verify-pack.c
verify-tag.c
worktree.c Merge branch 'pb/no-recursive-reset-hard-in-worktree-add' 2019-12-01 09:04:31 -08:00
write-tree.c