summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/dir.c b/dir.c
index 6fb2f8e..a3ad970 100644
--- a/dir.c
+++ b/dir.c
@@ -193,6 +193,10 @@ int fill_directory(struct dir_struct *dir,
const char *prefix;
size_t prefix_len;
+ unsigned exclusive_flags = DIR_SHOW_IGNORED | DIR_SHOW_IGNORED_TOO;
+ if ((dir->flags & exclusive_flags) == exclusive_flags)
+ BUG("DIR_SHOW_IGNORED and DIR_SHOW_IGNORED_TOO are exclusive");
+
/*
* Calculate common prefix for the pathspec, and
* use that to optimize the directory walk