unpack-trees: simplify verify_absent_sparse()
commitd61633ae186d26ab2c216108c917ec0ae7dd2782
authorElijah Newren <newren@gmail.com>
Fri, 27 Mar 2020 00:48:46 +0000 (27 00:48 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 27 Mar 2020 18:33:29 +0000 (27 11:33 -0700)
treea4b21e4ecbe87c4de5a5dd474b2a9127fd464940
parentd7dc1e1668fcbd5af019d0bc059b8dcb35743c86
unpack-trees: simplify verify_absent_sparse()

verify_absent_sparse() was introduced in commit 08402b0409
("merge-recursive: distinguish "removed" and "overwritten" messages",
2010-08-11), and has always had exactly one caller which always passes
error_type == ERROR_WOULD_LOSE_UNTRACKED_OVERWRITTEN.  This function
then checks whether error_type is this value, and if so, sets it instead
to ERROR_WOULD_LOSE_ORPHANED_OVERWRITTEN.  It has been nearly a decade
and no other caller has been created, and no other value has ever been
passed, so just pass the expected value to begin with.

Reviewed-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
unpack-trees.c