Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/dir.h
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2023-02-27 18:28:11 +0300
committerJunio C Hamano <gitster@pobox.com>2023-02-27 19:29:50 +0300
commit59e009bf15cefd89105c3e162776ccf10f4e68f1 (patch)
tree6a9f628b20420c8581c46c498076327b7249d855 /dir.h
parent5fdf285e6254fff4d9560f72878456f0a53e2e38 (diff)
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 <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir.h')
-rw-r--r--dir.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/dir.h b/dir.h
index 33fd848fc8..2196e12630 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;