diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-08-01 00:44:09 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-08-01 01:16:44 +0200 |
commit | 5bdedac3c7b0894643256304cd5f0dd29cf8eec9 (patch) | |
tree | 13fdeb61cb4c728dee967e02909f7bf1e757f857 /t/t7201-co.sh | |
parent | checkout/restore: add basic tests for --merge (diff) | |
download | git-5bdedac3c7b0894643256304cd5f0dd29cf8eec9.tar.xz git-5bdedac3c7b0894643256304cd5f0dd29cf8eec9.zip |
checkout: allow "checkout -m path" to unmerge removed paths
"git checkout -m -- path" uses the unmerge_marked_index() API, whose
implementation is incapable of unresolving a path that was resolved
as removed. Extend the unmerge_index() API function so that we can
mark the ce_flags member of the cache entries we add to the index as
unmerged, and replace use of unmerge_marked_index() with it.
Now, together with its unmerge_index_entry_at() helper function,
unmerge_marked_index() function is no longer called by anybody, and
can safely be removed.
This makes two known test failures in t2070 and t7201 to succeed.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7201-co.sh')
-rwxr-xr-x | t/t7201-co.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t7201-co.sh b/t/t7201-co.sh index 4b07a26c14..df582295df 100755 --- a/t/t7201-co.sh +++ b/t/t7201-co.sh @@ -543,7 +543,7 @@ test_expect_success 'checkout -m works after (mistaken) resolution' ' test_cmp merged file ' -test_expect_failure 'checkout -m works after (mistaken) resolution to remove' ' +test_expect_success 'checkout -m works after (mistaken) resolution to remove' ' setup_conflicting_index && echo "none of the above" >sample && cat sample >fild && |