@matheusbsbs / matheus-bagliano / commits / d7dc1e1668
Fork 0

unpack-trees: remove unused error type

commit 08402b0409 ("merge-recursive: distinguish "removed" and "overwritten" messages", 2010-08-11) split ERROR_WOULD_LOSE_UNTRACKED into both ERROR_WOULD_LOSE_UNTRACKED_OVERWRITTEN ERROR_WOULD_LOSE_UNTRACKED_REMOVED and also split ERROR_WOULD_LOSE_ORPHANED into both ERROR_WOULD_LOSE_ORPHANED_OVERWRITTEN ERROR_WOULD_LOSE_ORPHANED_REMOVED However, despite the split only three of these four types were used. ERROR_WOULD_LOSE_ORPHANED_REMOVED was not put into use when it was introduced and nothing else has used it in the intervening decade either. Remove it. Reviewed-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Elijah Newren committed Mar 27, 2020 at 00:48 UTC d7dc1e1668fcbd5af019d0bc059b8dcb35743c86
2 files changed -5
unpack-trees.c
-4
@@ -49,8 +49,6 @@ static const char *unpack_plumbing_errors[NB_UNPACK_TREES_ERROR_TYPES] = {
49 /* ERROR_WOULD_LOSE_ORPHANED_OVERWRITTEN */
50 "Working tree file '%s' would be overwritten by sparse checkout update.",
51
52 - /* ERROR_WOULD_LOSE_ORPHANED_REMOVED */
53 - "Working tree file '%s' would be removed by sparse checkout update.",
52
53 /* ERROR_WOULD_LOSE_SUBMODULE */
54 "Submodule '%s' cannot checkout new HEAD.",
@@ -172,8 +170,6 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
170 _("Cannot update sparse checkout: the following entries are not up to date:\n%s");
171 msgs[ERROR_WOULD_LOSE_ORPHANED_OVERWRITTEN] =
172 _("The following working tree files would be overwritten by sparse checkout update:\n%s");
175 - msgs[ERROR_WOULD_LOSE_ORPHANED_REMOVED] =
176 - _("The following working tree files would be removed by sparse checkout update:\n%s");
173 msgs[ERROR_WOULD_LOSE_SUBMODULE] =
174 _("Cannot update submodule:\n%s");
175
unpack-trees.h
-1
@@ -24,7 +24,6 @@ enum unpack_trees_error_types {
24 ERROR_BIND_OVERLAP,
25 ERROR_SPARSE_NOT_UPTODATE_FILE,
26 ERROR_WOULD_LOSE_ORPHANED_OVERWRITTEN,
27 - ERROR_WOULD_LOSE_ORPHANED_REMOVED,
27 ERROR_WOULD_LOSE_SUBMODULE,
28 NB_UNPACK_TREES_ERROR_TYPES
29 };