static int add_one_path(struct cache_entry *old, const char *path, int len, struct stat *st)
static int add_one_path(const struct cache_entry *old, const char *path, int len, struct stat *st)
{
int option, size;
struct cache_entry *ce;
@ -142,7 +142,7 @@ static int process_directory(const char *path, int len, struct stat *st)
@@ -142,7 +142,7 @@ static int process_directory(const char *path, int len, struct stat *st)
/* Exact match: file or existing gitlink */
if (pos >= 0) {
struct cache_entry *ce = active_cache[pos];
const struct cache_entry *ce = active_cache[pos];
if (S_ISGITLINK(ce->ce_mode)) {
/* Do nothing to the index if there is no HEAD! */
@ -158,7 +158,7 @@ static int process_directory(const char *path, int len, struct stat *st)
@@ -158,7 +158,7 @@ static int process_directory(const char *path, int len, struct stat *st)
/* Inexact match: is there perhaps a subdirectory match? */
static int write_entry(struct cache_entry *ce, char *path, const struct checkout *state, int to_tempfile)
static int write_entry(struct cache_entry *ce,
char *path, const struct checkout *state, int to_tempfile)
{
unsigned int ce_mode_s_ifmt = ce->ce_mode & S_IFMT;
int fd, ret, fstat_done = 0;
@ -233,7 +234,8 @@ static int check_path(const char *path, int len, struct stat *st, int skiplen)
@@ -233,7 +234,8 @@ static int check_path(const char *path, int len, struct stat *st, int skiplen)
return lstat(path, st);
}
int checkout_entry(struct cache_entry *ce, const struct checkout *state, char *topath)
@ -159,7 +159,7 @@ int read_tree(struct tree *tree, int stage, struct pathspec *match)
@@ -159,7 +159,7 @@ int read_tree(struct tree *tree, int stage, struct pathspec *match)
@ -1364,7 +1364,7 @@ static int check_ok_to_remove(const char *name, int len, int dtype,
@@ -1364,7 +1364,7 @@ static int check_ok_to_remove(const char *name, int len, int dtype,
enum unpack_trees_error_types error_type,
struct unpack_trees_options *o)
{
struct cache_entry *result;
const struct cache_entry *result;
/*
* It may be that the 'lstat()' succeeded even though