summaryrefslogtreecommitdiffstats
path: root/unpack-trees.h
diff options
context:
space:
mode:
authorMatthieu Moy <Matthieu.Moy@imag.fr>2010-08-11 10:38:07 +0200
committerJunio C Hamano <gitster@pobox.com>2010-08-11 10:36:06 -0700
commite6c111b4c092c0dd24c541b9721f5bc04641dcb0 (patch)
tree55fd6f65b2479bba7d15dece5fad53a451b6369d /unpack-trees.h
parent08402b0409bc501deb97cf4388a78ee9f87092c6 (diff)
downloadgit-e6c111b4c092c0dd24c541b9721f5bc04641dcb0.tar.gz
git-e6c111b4c092c0dd24c541b9721f5bc04641dcb0.tar.xz
unpack_trees: group error messages by type
When an error is encountered, it calls add_rejected_file() which either - directly displays the error message and stops if in plumbing mode (i.e. if show_all_errors is not initialized at 1) - or stores it so that it will be displayed at the end with display_error_msgs(), Storing the files by error type permits to have a list of files for which there is the same error instead of having a serie of almost identical errors. As each bind_overlap error combines a file and an old file, a list cannot be done, therefore, theses errors are not stored but directly displayed. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'unpack-trees.h')
-rw-r--r--unpack-trees.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/unpack-trees.h b/unpack-trees.h
index 8be6b3cca..6e049b099 100644
--- a/unpack-trees.h
+++ b/unpack-trees.h
@@ -22,6 +22,11 @@ enum unpack_trees_error_types {
NB_UNPACK_TREES_ERROR_TYPES
};
+struct rejected_paths_list {
+ char *path;
+ struct rejected_paths_list *next;
+};
+
struct unpack_trees_options {
unsigned int reset,
merge,
@@ -36,12 +41,18 @@ struct unpack_trees_options {
diff_index_cached,
debug_unpack,
skip_sparse_checkout,
- gently;
+ gently,
+ show_all_errors;
const char *prefix;
int cache_bottom;
struct dir_struct *dir;
merge_fn_t fn;
const char *msgs[NB_UNPACK_TREES_ERROR_TYPES];
+ /*
+ * Store error messages in an array, each case
+ * corresponding to a error message type
+ */
+ struct rejected_paths_list *unpack_rejects[NB_UNPACK_TREES_ERROR_TYPES];
int head_idx;
int merge_size;