]> git.proxmox.com Git - libgit2.git/blame - src/index.h
Basic framework for log command
[libgit2.git] / src / index.h
CommitLineData
bb742ede 1/*
359fc2d2 2 * Copyright (C) the libgit2 contributors. All rights reserved.
bb742ede
VM
3 *
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.
6 */
68535125
VM
7#ifndef INCLUDE_index_h__
8#define INCLUDE_index_h__
9
10#include "fileops.h"
817c2820 11#include "filebuf.h"
c4034e63 12#include "vector.h"
b4171320 13#include "tree-cache.h"
44908fe7
VM
14#include "git2/odb.h"
15#include "git2/index.h"
68535125 16
01ad7b3a
BR
17#define GIT_INDEX_FILE "index"
18#define GIT_INDEX_FILE_MODE 0666
19
68535125 20struct git_index {
9462c471
VM
21 git_refcount rc;
22
68535125 23 char *index_file_path;
6fd195d7 24
8ff0f325 25 git_futils_filestamp stamp;
c4034e63 26 git_vector entries;
68535125 27
86d7e1ca 28 unsigned int on_disk:1;
da825c92
RB
29
30 unsigned int ignore_case:1;
31 unsigned int distrust_filemode:1;
32 unsigned int no_symlinks:1;
33
b4171320 34 git_tree_cache *tree;
4c0b6a6d 35
0462fba5 36 git_vector names;
f45ec1a0 37 git_vector reuc;
ec40b7f9 38
f45ec1a0 39 git_vector_cmp entries_cmp_path;
ec40b7f9 40 git_vector_cmp entries_search;
f45ec1a0
ET
41 git_vector_cmp entries_search_path;
42 git_vector_cmp reuc_search;
68535125
VM
43};
44
0e0108f7
ET
45struct git_index_conflict_iterator {
46 git_index *index;
47 size_t cur;
48};
49
55cbd05b 50extern void git_index_entry__init_from_stat(git_index_entry *entry, struct stat *st);
7c7ff7d1 51
16248ee2 52extern size_t git_index__prefix_position(git_index *index, const char *path);
41a82592 53
55cbd05b
RB
54extern int git_index_entry__cmp(const void *a, const void *b);
55extern int git_index_entry__cmp_icase(const void *a, const void *b);
56
cb53669e 57extern void git_index__set_ignore_case(git_index *index, bool ignore_case);
3f0d0c85 58
68535125 59#endif