diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-07-31 15:44:05 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-07-31 16:02:17 -0700 |
commit | 35901f1c2461640019e70bbefecdce1f59f660d2 (patch) | |
tree | 06ad758a9bb60b9c67ae18257e0c8e31e69a94fc /builtin/commit-graph.c | |
parent | fe83269e16c1fd57df42c2a22a2b9ee621175a75 (diff) |
update-index: use unmerge_index_entry() to support removal
"update-index --unresolve" uses the unmerge_index_entry_at() that
assumes that the path to be unresolved must be in the index, which
makes it impossible to unresolve a path that was resolved as removal.
Rewrite unresolve_one() to use the unmerge_index_entry() to support
unresolving such a path.
Existing tests for "update-index --unresolve" forgot to check one
thing that tests for "checkout --merge -- paths" tested, which is to
make sure that resolve-undo record that has already been used to
recreate higher-stage index entries is removed. Add new invocations
of "ls-files --resolve-undo" after running "update-index --unresolve"
to make sure that unresolving with update-index does remove the used
resolve-undo records.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit-graph.c')
0 files changed, 0 insertions, 0 deletions