diff options
Diffstat (limited to 'dir.c')
-rw-r--r-- | dir.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -933,7 +933,7 @@ enum exist_status { */ static enum exist_status directory_exists_in_index_icase(const char *dirname, int len) { - struct cache_entry *ce = index_name_exists(&the_index, dirname, len + 1, ignore_case); + const struct cache_entry *ce = index_name_exists(&the_index, dirname, len + 1, ignore_case); unsigned char endchar; if (!ce) @@ -977,7 +977,7 @@ static enum exist_status directory_exists_in_index(const char *dirname, int len) if (pos < 0) pos = -pos-1; while (pos < active_nr) { - struct cache_entry *ce = active_cache[pos++]; + const struct cache_entry *ce = active_cache[pos++]; unsigned char endchar; if (strncmp(ce->name, dirname, len)) @@ -1036,9 +1036,7 @@ static enum path_treatment treat_directory(struct dir_struct *dir, return path_recurse; case index_gitdir: - if (dir->flags & DIR_SHOW_OTHER_DIRECTORIES) - return path_none; - return path_untracked; + return path_none; case index_nonexistent: if (dir->flags & DIR_SHOW_OTHER_DIRECTORIES) @@ -1115,7 +1113,7 @@ static int exclude_matches_pathspec(const char *path, int len, static int get_index_dtype(const char *path, int len) { int pos; - struct cache_entry *ce; + const struct cache_entry *ce; ce = cache_name_exists(path, len, 0); if (ce) { |