Revert "dir: update stale description of treat_directory()"
This reverts commit 4e689d8171,
to be replaced with a reworked version.
			
			
This commit is contained in:
		
							
								
								
									
										13
									
								
								dir.c
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								dir.c
									
									
									
									
									
								
							@ -1740,13 +1740,13 @@ static enum exist_status directory_exists_in_index(struct index_state *istate,
 | 
			
		||||
 * Case 3: if we didn't have it in the index previously, we
 | 
			
		||||
 * have a few sub-cases:
 | 
			
		||||
 *
 | 
			
		||||
 *  (a) if DIR_SHOW_OTHER_DIRECTORIES flag is set, we show it as
 | 
			
		||||
 *      just a directory, unless DIR_HIDE_EMPTY_DIRECTORIES is
 | 
			
		||||
 *  (a) if "show_other_directories" is true, we show it as
 | 
			
		||||
 *      just a directory, unless "hide_empty_directories" is
 | 
			
		||||
 *      also true, in which case we need to check if it contains any
 | 
			
		||||
 *      untracked and / or ignored files.
 | 
			
		||||
 *  (b) if it looks like a git directory and we don't have the
 | 
			
		||||
 *      DIR_NO_GITLINKS flag, then we treat it as a gitlink, and
 | 
			
		||||
 *      show it as a directory.
 | 
			
		||||
 *  (b) if it looks like a git directory, and we don't have
 | 
			
		||||
 *      'no_gitlinks' set we treat it as a gitlink, and show it
 | 
			
		||||
 *      as a directory.
 | 
			
		||||
 *  (c) otherwise, we recurse into it.
 | 
			
		||||
 */
 | 
			
		||||
static enum path_treatment treat_directory(struct dir_struct *dir,
 | 
			
		||||
@ -1834,6 +1834,7 @@ static enum path_treatment treat_directory(struct dir_struct *dir,
 | 
			
		||||
		return path_recurse;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/* This is the "show_other_directories" case */
 | 
			
		||||
	assert(dir->flags & DIR_SHOW_OTHER_DIRECTORIES);
 | 
			
		||||
 | 
			
		||||
	/*
 | 
			
		||||
@ -1848,7 +1849,7 @@ static enum path_treatment treat_directory(struct dir_struct *dir,
 | 
			
		||||
	/* Special cases for where this directory is excluded/ignored */
 | 
			
		||||
	if (excluded) {
 | 
			
		||||
		/*
 | 
			
		||||
		 * If DIR_SHOW_OTHER_DIRECTORIES is set and we're not
 | 
			
		||||
		 * In the show_other_directories case, if we're not
 | 
			
		||||
		 * hiding empty directories, there is no need to
 | 
			
		||||
		 * recurse into an ignored directory.
 | 
			
		||||
		 */
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user