mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
unpack-trees.c: use path_excluded() in check_ok_to_remove()
This function is responsible for determining if a path that is not tracked is ignored and allow "checkout" to overwrite it as needed. It used excluded() without checking if higher level directory in the path is ignored; correct it to use path_excluded() for this check. Signed-off-by: Junio C Hamano <gitster@pobox.com> --- * There are uses of lower-level interface excluded_from_list() in the codepath for narrow-checkout hack; they are supposed to be already checking each level as they descend, and are not touched with this patch.
This commit is contained in:
@@ -52,6 +52,7 @@ struct unpack_trees_options {
|
||||
const char *prefix;
|
||||
int cache_bottom;
|
||||
struct dir_struct *dir;
|
||||
struct path_exclude_check *path_exclude_check;
|
||||
struct pathspec *pathspec;
|
||||
merge_fn_t fn;
|
||||
const char *msgs[NB_UNPACK_TREES_ERROR_TYPES];
|
||||
|
||||
Reference in New Issue
Block a user