Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2020-03-27 03:48:57 +0300
committerJunio C Hamano <gitster@pobox.com>2020-03-27 21:33:30 +0300
commit6271d77cb1ccfb7e4124593b4463446fe1188cda (patch)
treec61eaeac3a59e827ddf48beb78aee8716f74b367 /unpack-trees.h
parent1ac83f42da6437d74098f162fcfa37474c94e223 (diff)
unpack-trees: split display_error_msgs() into two
display_error_msgs() is never called to show messages of both ERROR_* and WARNING_* types at the same time; it is instead called multiple times, separately for each type. Since we want to display these types differently, make two slightly different versions of this function. A subsequent commit will further modify unpack_trees() and how it calls the new display_warning_msgs(). Reviewed-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'unpack-trees.h')
-rw-r--r--unpack-trees.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/unpack-trees.h b/unpack-trees.h
index aac1ad4b01..dae948205f 100644
--- a/unpack-trees.h
+++ b/unpack-trees.h
@@ -24,10 +24,12 @@ enum unpack_trees_error_types {
ERROR_BIND_OVERLAP,
ERROR_WOULD_LOSE_SUBMODULE,
+ NB_UNPACK_TREES_ERROR_TYPES,
+
WARNING_SPARSE_NOT_UPTODATE_FILE,
WARNING_SPARSE_ORPHANED_NOT_OVERWRITTEN,
- NB_UNPACK_TREES_ERROR_TYPES,
+ NB_UNPACK_TREES_WARNING_TYPES,
};
/*
@@ -66,13 +68,13 @@ struct unpack_trees_options {
struct dir_struct *dir;
struct pathspec *pathspec;
merge_fn_t fn;
- const char *msgs[NB_UNPACK_TREES_ERROR_TYPES];
+ const char *msgs[NB_UNPACK_TREES_WARNING_TYPES];
struct argv_array msgs_to_free;
/*
* Store error messages in an array, each case
* corresponding to a error message type
*/
- struct string_list unpack_rejects[NB_UNPACK_TREES_ERROR_TYPES];
+ struct string_list unpack_rejects[NB_UNPACK_TREES_WARNING_TYPES];
int head_idx;
int merge_size;