Skip to content

Commit e6c0be9

Browse files
newrengitster
authored andcommitted
dir: fix a few confusing comments
Signed-off-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b3d7a52 commit e6c0be9

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

dir.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1820,7 +1820,7 @@ static enum path_treatment treat_directory(struct dir_struct *dir,
18201820
* to recurse into untracked/ignored directories if either of the
18211821
* following bits is set:
18221822
* - DIR_SHOW_IGNORED_TOO (because then we need to determine if
1823-
* there are ignored directories below)
1823+
* there are ignored entries below)
18241824
* - DIR_HIDE_EMPTY_DIRECTORIES (because we have to determine if
18251825
* the directory is empty)
18261826
*/
@@ -1838,10 +1838,11 @@ static enum path_treatment treat_directory(struct dir_struct *dir,
18381838
return path_excluded;
18391839

18401840
/*
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).
18451846
*/
18461847
check_only = ((dir->flags & DIR_HIDE_EMPTY_DIRECTORIES) &&
18471848
!(dir->flags & DIR_SHOW_IGNORED_TOO));

0 commit comments

Comments
 (0)