Skip to content

Commit 59e009b

Browse files
newrengitster
authored andcommitted
dir: add a usage note to exclude_per_dir
As evidenced by the fix a couple commits ago, places in the code using exclude_per_dir are likely buggy and should be adapted to call setup_standard_excludes() instead. Unfortunately, the usage of exclude_per_dir has been hardcoded into the arguments ls-files accepts, so we cannot actually remove it. Add a note that it is deprecated and no other callers should use it directly. Signed-off-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5fdf285 commit 59e009b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

dir.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,12 @@ struct dir_struct {
295295
struct untracked_cache *untracked;
296296

297297
/**
298-
* The name of the file to be read in each directory for excluded files
299-
* (typically `.gitignore`).
298+
* Deprecated: ls-files is the only allowed caller; all other callers
299+
* should leave this as NULL; it pre-dated the
300+
* setup_standard_excludes() mechanism that replaces this.
301+
*
302+
* This field tracks the name of the file to be read in each directory
303+
* for excluded files (typically `.gitignore`).
300304
*/
301305
const char *exclude_per_dir;
302306

0 commit comments

Comments
 (0)