]> git.ipfire.org Git - thirdparty/git.git/blobdiff - dir.c
rev-list --exclude: export add/clear-ref-exclusion and ref-excluded API
[thirdparty/git.git] / dir.c
diff --git a/dir.c b/dir.c
index 897c87403e978ab2123ce088cf2d3265e21d7dde..910bfcde4e432fae3bf57ec951258bc5a02bebb6 100644 (file)
--- a/dir.c
+++ b/dir.c
@@ -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) {