summaryrefslogtreecommitdiff
path: root/ref-filter.c
diff options
context:
space:
mode:
authorLibravatar Elijah Newren <newren@gmail.com>2021-09-24 06:37:04 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-09-24 09:24:25 -0700
commit446cc5544a3cb8dbd0ddac5bc5b160a687eb6471 (patch)
treec781ae7d26dbf079d7d9a0edd487a46e4a825b9c /ref-filter.c
parentMerge branch 'en/am-abort-fix' into en/removing-untracked-fixes (diff)
downloadtgif-446cc5544a3cb8dbd0ddac5bc5b160a687eb6471.tar.xz
t2500: add various tests for nuking untracked files
Noting that unpack_trees treats reset=1 & update=1 as license to nuke untracked files, I looked for code paths that use this combination and tried to generate testcases which demonstrated unintentional loss of untracked files and directories. I found several. I also include testcases for `git reset --{hard,merge,keep}`. A hard reset is perhaps the most direct test of unpack_tree's reset=1 behavior, but we cannot make `git reset --hard` preserve untracked files without some migration work. Also, the two commands `checkout --force` (because of the --force) and `read-tree --reset` (because it's plumbing and we need to keep it backward compatible) were left out as we expect those to continue removing untracked files and directories. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'ref-filter.c')
0 files changed, 0 insertions, 0 deletions