unpack-trees: make dir an internal-only struct

Avoid accidental misuse or confusion over ownership by clearly making
unpack_trees_options.dir an internal-only variable.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Elijah Newren
2021-09-27 16:33:42 +00:00
committed by Junio C Hamano
parent 04988c8d18
commit c42e0b6409
2 changed files with 6 additions and 3 deletions

View File

@@ -67,7 +67,6 @@ struct unpack_trees_options {
dry_run;
const char *prefix;
int cache_bottom;
struct dir_struct *dir;
struct pathspec *pathspec;
merge_fn_t fn;
const char *msgs[NB_UNPACK_TREES_WARNING_TYPES];
@@ -89,6 +88,7 @@ struct unpack_trees_options {
struct index_state result;
struct pattern_list *pl; /* for internal use */
struct dir_struct *dir; /* for internal use only */
struct checkout_metadata meta;
};