From: Jonathan Tan Date: Fri, 24 Feb 2023 22:31:16 GMT Subject: Re: [PATCH 02/11] dir: add a usage note to exclude_per_dir Message-ID: <20230224223116.1508846-1-jonathantanmy@google.com> In-Reply-To: <239b10e11812d99be587265c0a5e283da45ca315.1677143700.git.gitgitgadget@gmail.com> "Elijah Newren via GitGitGadget" writes: > diff --git a/dir.h b/dir.h > index 33fd848fc8d..2196e12630c 100644 > --- a/dir.h > +++ b/dir.h > @@ -295,8 +295,12 @@ struct dir_struct { > struct untracked_cache *untracked; > > /** > - * The name of the file to be read in each directory for excluded files > - * (typically `.gitignore`). > + * Deprecated: ls-files is the only allowed caller; all other callers > + * should leave this as NULL; it pre-dated the > + * setup_standard_excludes() mechanism that replaces this. > + * > + * This field tracks the name of the file to be read in each directory > + * for excluded files (typically `.gitignore`). > */ > const char *exclude_per_dir; I'm not sure what is meant by "allowed caller", but I wouldn't have expected this to also mean that unpack-trees would need to know to propagate this from o->internal.dir to d in verify_clean_subdirectory. I would be OK with excluding this from the patch set - I think the other changes can stand independent of this.