unpack-trees: mark fields only used internally as internal

Continue the work from the previous patch by finding additional fields which are only used internally but not yet explicitly marked as such, and include them in the internal fields struct. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Elijah Newren committed Feb 27, 2023 at 15:28 UTC 13e1fd6e38f17fe7fecfb6e6c30af053a3c2c420
2 files changed +95 -90
unpack-trees.c
+80 -79
@@ -66,8 +66,8 @@ static const char *unpack_plumbing_errors[NB_UNPACK_TREES_WARNING_TYPES] = {
66 };
67
68 #define ERRORMSG(o,type) \
69 - ( ((o) && (o)->msgs[(type)]) \
70 - ? ((o)->msgs[(type)]) \
69 + ( ((o) && (o)->internal.msgs[(type)]) \
70 + ? ((o)->internal.msgs[(type)]) \
71 : (unpack_plumbing_errors[(type)]) )
72
73 static const char *super_prefixed(const char *path, const char *super_prefix)
@@ -108,10 +108,10 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
108 const char *cmd)
109 {
110 int i;
111 - const char **msgs = opts->msgs;
111 + const char **msgs = opts->internal.msgs;
112 const char *msg;
113
114 - strvec_init(&opts->msgs_to_free);
114 + strvec_init(&opts->internal.msgs_to_free);
115
116 if (!strcmp(cmd, "checkout"))
117 msg = advice_enabled(ADVICE_COMMIT_BEFORE_MERGE)
@@ -129,7 +129,7 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
129 "Please commit your changes or stash them before you %s.")
130 : _("Your local changes to the following files would be overwritten by %s:\n%%s");
131 msgs[ERROR_WOULD_OVERWRITE] = msgs[ERROR_NOT_UPTODATE_FILE] =
132 - strvec_pushf(&opts->msgs_to_free, msg, cmd, cmd);
132 + strvec_pushf(&opts->internal.msgs_to_free, msg, cmd, cmd);
133
134 msgs[ERROR_NOT_UPTODATE_DIR] =
135 _("Updating the following directories would lose untracked files in them:\n%s");
@@ -153,7 +153,7 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
153 "Please move or remove them before you %s.")
154 : _("The following untracked working tree files would be removed by %s:\n%%s");
155 msgs[ERROR_WOULD_LOSE_UNTRACKED_REMOVED] =
156 - strvec_pushf(&opts->msgs_to_free, msg, cmd, cmd);
156 + strvec_pushf(&opts->internal.msgs_to_free, msg, cmd, cmd);
157
158 if (!strcmp(cmd, "checkout"))
159 msg = advice_enabled(ADVICE_COMMIT_BEFORE_MERGE)
@@ -171,7 +171,7 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
171 "Please move or remove them before you %s.")
172 : _("The following untracked working tree files would be overwritten by %s:\n%%s");
173 msgs[ERROR_WOULD_LOSE_UNTRACKED_OVERWRITTEN] =
174 - strvec_pushf(&opts->msgs_to_free, msg, cmd, cmd);
174 + strvec_pushf(&opts->internal.msgs_to_free, msg, cmd, cmd);
175
176 /*
177 * Special case: ERROR_BIND_OVERLAP refers to a pair of paths, we
@@ -189,16 +189,16 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
189 msgs[WARNING_SPARSE_ORPHANED_NOT_OVERWRITTEN] =
190 _("The following paths were already present and thus not updated despite sparse patterns:\n%s");
191
192 - opts->show_all_errors = 1;
192 + opts->internal.show_all_errors = 1;
193 /* rejected paths may not have a static buffer */
194 - for (i = 0; i < ARRAY_SIZE(opts->unpack_rejects); i++)
195 - opts->unpack_rejects[i].strdup_strings = 1;
194 + for (i = 0; i < ARRAY_SIZE(opts->internal.unpack_rejects); i++)
195 + opts->internal.unpack_rejects[i].strdup_strings = 1;
196 }
197
198 void clear_unpack_trees_porcelain(struct unpack_trees_options *opts)
199 {
200 - strvec_clear(&opts->msgs_to_free);
201 - memset(opts->msgs, 0, sizeof(opts->msgs));
200 + strvec_clear(&opts->internal.msgs_to_free);
201 + memset(opts->internal.msgs, 0, sizeof(opts->internal.msgs));
202 }
203
204 static int do_add_entry(struct unpack_trees_options *o, struct cache_entry *ce,
@@ -210,7 +210,7 @@ static int do_add_entry(struct unpack_trees_options *o, struct cache_entry *ce,
210 set |= CE_WT_REMOVE;
211
212 ce->ce_flags = (ce->ce_flags & ~clear) | set;
213 - return add_index_entry(&o->result, ce,
213 + return add_index_entry(&o->internal.result, ce,
214 ADD_CACHE_OK_TO_ADD | ADD_CACHE_OK_TO_REPLACE);
215 }
216
@@ -218,7 +218,7 @@ static void add_entry(struct unpack_trees_options *o,
218 const struct cache_entry *ce,
219 unsigned int set, unsigned int clear)
220 {
221 - do_add_entry(o, dup_cache_entry(ce, &o->result), set, clear);
221 + do_add_entry(o, dup_cache_entry(ce, &o->internal.result), set, clear);
222 }
223
224 /*
@@ -233,7 +233,7 @@ static int add_rejected_path(struct unpack_trees_options *o,
233 if (o->quiet)
234 return -1;
235
236 - if (!o->show_all_errors)
236 + if (!o->internal.show_all_errors)
237 return error(ERRORMSG(o, e), super_prefixed(path,
238 o->super_prefix));
239
@@ -241,7 +241,7 @@ static int add_rejected_path(struct unpack_trees_options *o,
241 * Otherwise, insert in a list for future display by
242 * display_(error|warning)_msgs()
243 */
244 - string_list_append(&o->unpack_rejects[e], path);
244 + string_list_append(&o->internal.unpack_rejects[e], path);
245 return -1;
246 }
247
@@ -253,7 +253,7 @@ static void display_error_msgs(struct unpack_trees_options *o)
253 int e;
254 unsigned error_displayed = 0;
255 for (e = 0; e < NB_UNPACK_TREES_ERROR_TYPES; e++) {
256 - struct string_list *rejects = &o->unpack_rejects[e];
256 + struct string_list *rejects = &o->internal.unpack_rejects[e];
257
258 if (rejects->nr > 0) {
259 int i;
@@ -281,7 +281,7 @@ static void display_warning_msgs(struct unpack_trees_options *o)
281 unsigned warning_displayed = 0;
282 for (e = NB_UNPACK_TREES_ERROR_TYPES + 1;
283 e < NB_UNPACK_TREES_WARNING_TYPES; e++) {
284 - struct string_list *rejects = &o->unpack_rejects[e];
284 + struct string_list *rejects = &o->internal.unpack_rejects[e];
285
286 if (rejects->nr > 0) {
287 int i;
@@ -600,13 +600,14 @@ static void mark_ce_used(struct cache_entry *ce, struct unpack_trees_options *o)
600 {
601 ce->ce_flags |= CE_UNPACKED;
602
603 - if (o->cache_bottom < o->src_index->cache_nr &&
604 - o->src_index->cache[o->cache_bottom] == ce) {
605 - int bottom = o->cache_bottom;
603 + if (o->internal.cache_bottom < o->src_index->cache_nr &&
604 + o->src_index->cache[o->internal.cache_bottom] == ce) {
605 + int bottom = o->internal.cache_bottom;
606 +
607 while (bottom < o->src_index->cache_nr &&
608 o->src_index->cache[bottom]->ce_flags & CE_UNPACKED)
609 bottom++;
609 - o->cache_bottom = bottom;
610 + o->internal.cache_bottom = bottom;
611 }
612 }
613
@@ -652,7 +653,7 @@ static void mark_ce_used_same_name(struct cache_entry *ce,
653 static struct cache_entry *next_cache_entry(struct unpack_trees_options *o)
654 {
655 const struct index_state *index = o->src_index;
655 - int pos = o->cache_bottom;
656 + int pos = o->internal.cache_bottom;
657
658 while (pos < index->cache_nr) {
659 struct cache_entry *ce = index->cache[pos];
@@ -711,7 +712,7 @@ static void restore_cache_bottom(struct traverse_info *info, int bottom)
712
713 if (o->diff_index_cached)
714 return;
714 - o->cache_bottom = bottom;
715 + o->internal.cache_bottom = bottom;
716 }
717
718 static int switch_cache_bottom(struct traverse_info *info)
@@ -721,13 +722,13 @@ static int switch_cache_bottom(struct traverse_info *info)
722
723 if (o->diff_index_cached)
724 return 0;
724 - ret = o->cache_bottom;
725 + ret = o->internal.cache_bottom;
726 pos = find_cache_pos(info->prev, info->name, info->namelen);
727
728 if (pos < -1)
728 - o->cache_bottom = -2 - pos;
729 + o->internal.cache_bottom = -2 - pos;
730 else if (pos < 0)
730 - o->cache_bottom = o->src_index->cache_nr;
731 + o->internal.cache_bottom = o->src_index->cache_nr;
732 return ret;
733 }
734
@@ -873,9 +874,9 @@ static int traverse_trees_recursive(int n, unsigned long dirmask,
874 * save and restore cache_bottom anyway to not miss
875 * unprocessed entries before 'pos'.
876 */
876 - bottom = o->cache_bottom;
877 + bottom = o->internal.cache_bottom;
878 ret = traverse_by_cache_tree(pos, nr_entries, n, info);
878 - o->cache_bottom = bottom;
879 + o->internal.cache_bottom = bottom;
880 return ret;
881 }
882
@@ -1212,7 +1213,7 @@ static int unpack_single_entry(int n, unsigned long mask,
1213 * cache entry from the index aware logic.
1214 */
1215 src[i + o->merge] = create_ce_entry(info, names + i, stage,
1215 - &o->result, o->merge,
1216 + &o->internal.result, o->merge,
1217 bit & dirmask);
1218 }
1219
@@ -1237,7 +1238,7 @@ static int unpack_single_entry(int n, unsigned long mask,
1238
1239 static int unpack_failed(struct unpack_trees_options *o, const char *message)
1240 {
1240 - discard_index(&o->result);
1241 + discard_index(&o->internal.result);
1242 if (!o->quiet && !o->exiting_early) {
1243 if (message)
1244 return error("%s", message);
@@ -1260,7 +1261,7 @@ static int find_cache_pos(struct traverse_info *info,
1261 struct index_state *index = o->src_index;
1262 int pfxlen = info->pathlen;
1263
1263 - for (pos = o->cache_bottom; pos < index->cache_nr; pos++) {
1264 + for (pos = o->internal.cache_bottom; pos < index->cache_nr; pos++) {
1265 const struct cache_entry *ce = index->cache[pos];
1266 const char *ce_name, *ce_slash;
1267 int cmp, ce_len;
@@ -1271,8 +1272,8 @@ static int find_cache_pos(struct traverse_info *info,
1272 * we can never match it; don't check it
1273 * again.
1274 */
1274 - if (pos == o->cache_bottom)
1275 - ++o->cache_bottom;
1275 + if (pos == o->internal.cache_bottom)
1276 + ++o->internal.cache_bottom;
1277 continue;
1278 }
1279 if (!ce_in_traverse_path(ce, info)) {
@@ -1450,7 +1451,7 @@ static int unpack_sparse_callback(int n, unsigned long mask, unsigned long dirma
1451 */
1452 if (!is_null_oid(&names[0].oid)) {
1453 src[0] = create_ce_entry(info, &names[0], 0,
1453 - &o->result, 1,
1454 + &o->internal.result, 1,
1455 dirmask & (1ul << 0));
1456 src[0]->ce_flags |= (CE_SKIP_WORKTREE | CE_NEW_SKIP_WORKTREE);
1457 }
@@ -1560,7 +1561,7 @@ static int unpack_callback(int n, unsigned long mask, unsigned long dirmask, str
1561 * in 'mark_ce_used()'
1562 */
1563 if (!src[0] || !S_ISSPARSEDIR(src[0]->ce_mode))
1563 - o->cache_bottom += matches;
1564 + o->internal.cache_bottom += matches;
1565 return mask;
1566 }
1567 }
@@ -1907,37 +1908,37 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
1908 populate_from_existing_patterns(o, &pl);
1909 }
1910
1910 - index_state_init(&o->result, o->src_index->repo);
1911 - o->result.initialized = 1;
1912 - o->result.timestamp.sec = o->src_index->timestamp.sec;
1913 - o->result.timestamp.nsec = o->src_index->timestamp.nsec;
1914 - o->result.version = o->src_index->version;
1911 + index_state_init(&o->internal.result, o->src_index->repo);
1912 + o->internal.result.initialized = 1;
1913 + o->internal.result.timestamp.sec = o->src_index->timestamp.sec;
1914 + o->internal.result.timestamp.nsec = o->src_index->timestamp.nsec;
1915 + o->internal.result.version = o->src_index->version;
1916 if (!o->src_index->split_index) {
1916 - o->result.split_index = NULL;
1917 + o->internal.result.split_index = NULL;
1918 } else if (o->src_index == o->dst_index) {
1919 /*
1920 * o->dst_index (and thus o->src_index) will be discarded
1920 - * and overwritten with o->result at the end of this function,
1921 + * and overwritten with o->internal.result at the end of this function,
1922 * so just use src_index's split_index to avoid having to
1923 * create a new one.
1924 */
1924 - o->result.split_index = o->src_index->split_index;
1925 - o->result.split_index->refcount++;
1925 + o->internal.result.split_index = o->src_index->split_index;
1926 + o->internal.result.split_index->refcount++;
1927 } else {
1927 - o->result.split_index = init_split_index(&o->result);
1928 + o->internal.result.split_index = init_split_index(&o->internal.result);
1929 }
1929 - oidcpy(&o->result.oid, &o->src_index->oid);
1930 + oidcpy(&o->internal.result.oid, &o->src_index->oid);
1931 o->merge_size = len;
1932 mark_all_ce_unused(o->src_index);
1933
1933 - o->result.fsmonitor_last_update =
1934 + o->internal.result.fsmonitor_last_update =
1935 xstrdup_or_null(o->src_index->fsmonitor_last_update);
1935 - o->result.fsmonitor_has_run_once = o->src_index->fsmonitor_has_run_once;
1936 + o->internal.result.fsmonitor_has_run_once = o->src_index->fsmonitor_has_run_once;
1937
1938 if (!o->src_index->initialized &&
1939 !repo->settings.command_requires_full_index &&
1939 - is_sparse_index_allowed(&o->result, 0))
1940 - o->result.sparse_index = 1;
1940 + is_sparse_index_allowed(&o->internal.result, 0))
1941 + o->internal.result.sparse_index = 1;
1942
1943 /*
1944 * Sparse checkout loop #1: set NEW_SKIP_WORKTREE on existing entries
@@ -1957,7 +1958,7 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
1958 setup_traverse_info(&info, prefix);
1959 info.fn = unpack_callback;
1960 info.data = o;
1960 - info.show_all_errors = o->show_all_errors;
1961 + info.show_all_errors = o->internal.show_all_errors;
1962 info.pathspec = o->pathspec;
1963
1964 if (o->prefix) {
@@ -1998,7 +1999,7 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
1999 }
2000 mark_all_ce_unused(o->src_index);
2001
2001 - if (o->trivial_merges_only && o->nontrivial_merge) {
2002 + if (o->trivial_merges_only && o->internal.nontrivial_merge) {
2003 ret = unpack_failed(o, "Merge requires file-level merging");
2004 goto done;
2005 }
@@ -2009,13 +2010,13 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
2010 * If they will have NEW_SKIP_WORKTREE, also set CE_SKIP_WORKTREE
2011 * so apply_sparse_checkout() won't attempt to remove it from worktree
2012 */
2012 - mark_new_skip_worktree(o->internal.pl, &o->result,
2013 + mark_new_skip_worktree(o->internal.pl, &o->internal.result,
2014 CE_ADDED, CE_SKIP_WORKTREE | CE_NEW_SKIP_WORKTREE,
2015 o->verbose_update);
2016
2017 ret = 0;
2017 - for (i = 0; i < o->result.cache_nr; i++) {
2018 - struct cache_entry *ce = o->result.cache[i];
2018 + for (i = 0; i < o->internal.result.cache_nr; i++) {
2019 + struct cache_entry *ce = o->internal.result.cache[i];
2020
2021 /*
2022 * Entries marked with CE_ADDED in merged_entry() do not have
@@ -2029,7 +2030,7 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
2030 verify_absent(ce, WARNING_SPARSE_ORPHANED_NOT_OVERWRITTEN, o))
2031 ret = 1;
2032
2032 - if (apply_sparse_checkout(&o->result, ce, o))
2033 + if (apply_sparse_checkout(&o->internal.result, ce, o))
2034 ret = 1;
2035 }
2036 if (ret == 1) {
@@ -2037,30 +2038,30 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
2038 * Inability to sparsify or de-sparsify individual
2039 * paths is not an error, but just a warning.
2040 */
2040 - if (o->show_all_errors)
2041 + if (o->internal.show_all_errors)
2042 display_warning_msgs(o);
2043 ret = 0;
2044 }
2045 }
2046
2046 - ret = check_updates(o, &o->result) ? (-2) : 0;
2047 + ret = check_updates(o, &o->internal.result) ? (-2) : 0;
2048 if (o->dst_index) {
2048 - move_index_extensions(&o->result, o->src_index);
2049 + move_index_extensions(&o->internal.result, o->src_index);
2050 if (!ret) {
2051 if (git_env_bool("GIT_TEST_CHECK_CACHE_TREE", 0))
2051 - cache_tree_verify(the_repository, &o->result);
2052 + cache_tree_verify(the_repository, &o->internal.result);
2053 if (!o->skip_cache_tree_update &&
2053 - !cache_tree_fully_valid(o->result.cache_tree))
2054 - cache_tree_update(&o->result,
2054 + !cache_tree_fully_valid(o->internal.result.cache_tree))
2055 + cache_tree_update(&o->internal.result,
2056 WRITE_TREE_SILENT |
2057 WRITE_TREE_REPAIR);
2058 }
2059
2059 - o->result.updated_workdir = 1;
2060 + o->internal.result.updated_workdir = 1;
2061 discard_index(o->dst_index);
2061 - *o->dst_index = o->result;
2062 + *o->dst_index = o->internal.result;
2063 } else {
2063 - discard_index(&o->result);
2064 + discard_index(&o->internal.result);
2065 }
2066 o->src_index = NULL;
2067
@@ -2076,7 +2077,7 @@ done:
2077 return ret;
2078
2079 return_failed:
2079 - if (o->show_all_errors)
2080 + if (o->internal.show_all_errors)
2081 display_error_msgs(o);
2082 mark_all_ce_unused(o->src_index);
2083 ret = unpack_failed(o, NULL);
@@ -2099,9 +2100,9 @@ enum update_sparsity_result update_sparsity(struct unpack_trees_options *o,
2100 unsigned old_show_all_errors;
2101 int free_pattern_list = 0;
2102
2102 - old_show_all_errors = o->show_all_errors;
2103 - o->show_all_errors = 1;
2104 - index_state_init(&o->result, o->src_index->repo);
2103 + old_show_all_errors = o->internal.show_all_errors;
2104 + o->internal.show_all_errors = 1;
2105 + index_state_init(&o->internal.result, o->src_index->repo);
2106
2107 /* Sanity checks */
2108 if (!o->update || o->index_only || o->skip_sparse_checkout)
@@ -2148,7 +2149,7 @@ enum update_sparsity_result update_sparsity(struct unpack_trees_options *o,
2149 ret = UPDATE_SPARSITY_WORKTREE_UPDATE_FAILURES;
2150
2151 display_warning_msgs(o);
2151 - o->show_all_errors = old_show_all_errors;
2152 + o->internal.show_all_errors = old_show_all_errors;
2153 if (free_pattern_list) {
2154 clear_pattern_list(pl);
2155 free(pl);
@@ -2248,15 +2249,15 @@ static int verify_uptodate_sparse(const struct cache_entry *ce,
2249 }
2250
2251 /*
2251 - * TODO: We should actually invalidate o->result, not src_index [1].
2252 + * TODO: We should actually invalidate o->internal.result, not src_index [1].
2253 * But since cache tree and untracked cache both are not copied to
2253 - * o->result until unpacking is complete, we invalidate them on
2254 + * o->internal.result until unpacking is complete, we invalidate them on
2255 * src_index instead with the assumption that they will be copied to
2256 * dst_index at the end.
2257 *
2258 * [1] src_index->cache_tree is also used in unpack_callback() so if
2258 - * we invalidate o->result, we need to update it to use
2259 - * o->result.cache_tree as well.
2259 + * we invalidate o->internal.result, we need to update it to use
2260 + * o->internal.result.cache_tree as well.
2261 */
2262 static void invalidate_ce_path(const struct cache_entry *ce,
2263 struct unpack_trees_options *o)
@@ -2424,7 +2425,7 @@ static int check_ok_to_remove(const char *name, int len, int dtype,
2425 * delete this path, which is in a subdirectory that
2426 * is being replaced with a blob.
2427 */
2427 - result = index_file_exists(&o->result, name, len, 0);
2428 + result = index_file_exists(&o->internal.result, name, len, 0);
2429 if (result) {
2430 if (result->ce_flags & CE_REMOVE)
2431 return 0;
@@ -2525,7 +2526,7 @@ static int merged_entry(const struct cache_entry *ce,
2526 struct unpack_trees_options *o)
2527 {
2528 int update = CE_UPDATE;
2528 - struct cache_entry *merge = dup_cache_entry(ce, &o->result);
2529 + struct cache_entry *merge = dup_cache_entry(ce, &o->internal.result);
2530
2531 if (!old) {
2532 /*
@@ -2620,7 +2621,7 @@ static int merged_sparse_dir(const struct cache_entry * const *src, int n,
2621 setup_traverse_info(&info, src[0]->name);
2622 info.fn = unpack_sparse_callback;
2623 info.data = o;
2623 - info.show_all_errors = o->show_all_errors;
2624 + info.show_all_errors = o->internal.show_all_errors;
2625 info.pathspec = o->pathspec;
2626
2627 /* Get the tree descriptors of the sparse directory in each of the merging trees */
@@ -2838,7 +2839,7 @@ int threeway_merge(const struct cache_entry * const *stages,
2839 return -1;
2840 }
2841
2841 - o->nontrivial_merge = 1;
2842 + o->internal.nontrivial_merge = 1;
2843
2844 /* #2, #3, #4, #6, #7, #9, #10, #11. */
2845 count = 0;
unpack-trees.h
+15 -11
@@ -59,7 +59,6 @@ struct unpack_trees_options {
59 preserve_ignored,
60 clone,
61 index_only,
62 - nontrivial_merge,
62 trivial_merges_only,
63 verbose_update,
64 aggressive,
@@ -70,22 +69,13 @@ struct unpack_trees_options {
69 skip_sparse_checkout,
70 quiet,
71 exiting_early,
73 - show_all_errors,
72 dry_run,
73 skip_cache_tree_update;
74 enum unpack_trees_reset_type reset;
75 const char *prefix;
76 const char *super_prefix;
79 - int cache_bottom;
77 struct pathspec *pathspec;
78 merge_fn_t fn;
82 - const char *msgs[NB_UNPACK_TREES_WARNING_TYPES];
83 - struct strvec msgs_to_free;
84 - /*
85 - * Store error messages in an array, each case
86 - * corresponding to a error message type
87 - */
88 - struct string_list unpack_rejects[NB_UNPACK_TREES_WARNING_TYPES];
79
80 int head_idx;
81 int merge_size;
@@ -95,11 +85,25 @@ struct unpack_trees_options {
85
86 struct index_state *dst_index;
87 struct index_state *src_index;
98 - struct index_state result;
88
89 struct checkout_metadata meta;
90
91 struct unpack_trees_options_internal {
92 + unsigned int nontrivial_merge,
93 + show_all_errors;
94 +
95 + int cache_bottom;
96 + const char *msgs[NB_UNPACK_TREES_WARNING_TYPES];
97 + struct strvec msgs_to_free;
98 +
99 + /*
100 + * Store error messages in an array, each case
101 + * corresponding to a error message type
102 + */
103 + struct string_list unpack_rejects[NB_UNPACK_TREES_WARNING_TYPES];
104 +
105 + struct index_state result;
106 +
107 struct pattern_list *pl;
108 struct dir_struct *dir;
109 } internal;