dir: fix a few confusing comments
Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elijah Newren committed
Jun 11, 2020 at 06:59 UTC
e6c0be92394ee658d97fd02a517d22192ac1eb55
1 file changed
+6
-5
dir.c
+6
-5
@@ -1820,7 +1820,7 @@ static enum path_treatment treat_directory(struct dir_struct *dir,
1820
* to recurse into untracked/ignored directories if either of the
1821
* following bits is set:
1822
* - DIR_SHOW_IGNORED_TOO (because then we need to determine if
1823
- * there are ignored directories below)
1823
+ * there are ignored entries below)
1824
* - DIR_HIDE_EMPTY_DIRECTORIES (because we have to determine if
1825
* the directory is empty)
1826
*/
@@ -1838,10 +1838,11 @@ static enum path_treatment treat_directory(struct dir_struct *dir,
1838
return path_excluded;
1839
1840
/*
1841
- * If we have we don't want to know the all the paths under an
1842
- * untracked or ignored directory, we still need to go into the
1843
- * directory to determine if it is empty (because an empty directory
1844
- * should be path_none instead of path_excluded or path_untracked).
1841
+ * Even if we don't want to know all the paths under an untracked or
1842
+ * ignored directory, we may still need to go into the directory to
1843
+ * determine if it is empty (because with DIR_HIDE_EMPTY_DIRECTORIES,
1844
+ * an empty directory should be path_none instead of path_excluded or
1845
+ * path_untracked).
1846
*/
1847
check_only = ((dir->flags & DIR_HIDE_EMPTY_DIRECTORIES) &&
1848
!(dir->flags & DIR_SHOW_IGNORED_TOO));