]> git.ipfire.org Git - thirdparty/git.git/commitdiff
unpack-trees: remove unused error type
authorElijah Newren <newren@gmail.com>
Fri, 27 Mar 2020 00:48:45 +0000 (00:48 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 27 Mar 2020 18:33:29 +0000 (11:33 -0700)
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>
unpack-trees.c
unpack-trees.h

index 0d0eec0221e157364f5fa12ebce6d21e00272f3e..f72a7a21f9cd3f0e90d7ce010a74e6e1b167e6d1 100644 (file)
@@ -49,8 +49,6 @@ static const char *unpack_plumbing_errors[NB_UNPACK_TREES_ERROR_TYPES] = {
        /* ERROR_WOULD_LOSE_ORPHANED_OVERWRITTEN */
        "Working tree file '%s' would be overwritten by sparse checkout update.",
 
-       /* ERROR_WOULD_LOSE_ORPHANED_REMOVED */
-       "Working tree file '%s' would be removed by sparse checkout update.",
 
        /* ERROR_WOULD_LOSE_SUBMODULE */
        "Submodule '%s' cannot checkout new HEAD.",
@@ -172,8 +170,6 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
                _("Cannot update sparse checkout: the following entries are not up to date:\n%s");
        msgs[ERROR_WOULD_LOSE_ORPHANED_OVERWRITTEN] =
                _("The following working tree files would be overwritten by sparse checkout update:\n%s");
-       msgs[ERROR_WOULD_LOSE_ORPHANED_REMOVED] =
-               _("The following working tree files would be removed by sparse checkout update:\n%s");
        msgs[ERROR_WOULD_LOSE_SUBMODULE] =
                _("Cannot update submodule:\n%s");
 
index ae1557fb8046c957dfa1feef6349a0117617f389..6d7c7b6c2e0041f3dc177b1f0c556bdd672333d8 100644 (file)
@@ -24,7 +24,6 @@ enum unpack_trees_error_types {
        ERROR_BIND_OVERLAP,
        ERROR_SPARSE_NOT_UPTODATE_FILE,
        ERROR_WOULD_LOSE_ORPHANED_OVERWRITTEN,
-       ERROR_WOULD_LOSE_ORPHANED_REMOVED,
        ERROR_WOULD_LOSE_SUBMODULE,
        NB_UNPACK_TREES_ERROR_TYPES
 };