2 * Copyright (C) the libgit2 contributors. All rights reserved.
4 * This file is part of libgit2, distributed under the GNU GPL v2 with
5 * a Linking Exception. For full terms see the included COPYING file.
7 #ifndef INCLUDE_index_h__
8 #define INCLUDE_index_h__
13 #include "tree-cache.h"
15 #include "git2/index.h"
17 #define GIT_INDEX_FILE "index"
18 #define GIT_INDEX_FILE_MODE 0666
23 char *index_file_path
;
25 git_futils_filestamp stamp
;
28 unsigned int on_disk
:1;
30 unsigned int ignore_case
:1;
31 unsigned int distrust_filemode
:1;
32 unsigned int no_symlinks
:1;
39 git_vector_cmp entries_cmp_path
;
40 git_vector_cmp entries_search
;
41 git_vector_cmp entries_search_path
;
42 git_vector_cmp reuc_search
;
45 extern void git_index_entry__init_from_stat(git_index_entry
*entry
, struct stat
*st
);
47 extern size_t git_index__prefix_position(git_index
*index
, const char *path
);
49 extern int git_index_entry__cmp(const void *a
, const void *b
);
50 extern int git_index_entry__cmp_icase(const void *a
, const void *b
);
52 extern void git_index__set_ignore_case(git_index
*index
, bool ignore_case
);