*: remove 'const' qualifier for struct index_state

Several methods specify that they take a 'struct index_state' pointer with the 'const' qualifier because they intend to only query the data, not change it. However, we will be introducing a step very low in the method stack that might modify a sparse-index to become a full index in the case that our queries venture inside a sparse-directory entry. This change only removes the 'const' qualifiers that are necessary for the following change which will actually modify the implementation of index_name_stage_pos(). Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Reviewed-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Derrick Stolee committed Apr 1, 2021 at 01:49 UTC 847a9e5d4f876646e128c89f0818b1a8ce792509
14 files changed +68 -68
attr.c
+7 -7
@@ -718,7 +718,7 @@ static struct attr_stack *read_attr_from_file(const char *path, int macro_ok)
718 return res;
719 }
720
721 -static struct attr_stack *read_attr_from_index(const struct index_state *istate,
721 +static struct attr_stack *read_attr_from_index(struct index_state *istate,
722 const char *path,
723 int macro_ok)
724 {
@@ -748,7 +748,7 @@ static struct attr_stack *read_attr_from_index(const struct index_state *istate,
748 return res;
749 }
750
751 -static struct attr_stack *read_attr(const struct index_state *istate,
751 +static struct attr_stack *read_attr(struct index_state *istate,
752 const char *path, int macro_ok)
753 {
754 struct attr_stack *res = NULL;
@@ -840,7 +840,7 @@ static void push_stack(struct attr_stack **attr_stack_p,
840 }
841 }
842
843 -static void bootstrap_attr_stack(const struct index_state *istate,
843 +static void bootstrap_attr_stack(struct index_state *istate,
844 struct attr_stack **stack)
845 {
846 struct attr_stack *e;
@@ -878,7 +878,7 @@ static void bootstrap_attr_stack(const struct index_state *istate,
878 push_stack(stack, e, NULL, 0);
879 }
880
881 -static void prepare_attr_stack(const struct index_state *istate,
881 +static void prepare_attr_stack(struct index_state *istate,
882 const char *path, int dirlen,
883 struct attr_stack **stack)
884 {
@@ -1078,7 +1078,7 @@ static void determine_macros(struct all_attrs_item *all_attrs,
1078 * If check->check_nr is non-zero, only attributes in check[] are collected.
1079 * Otherwise all attributes are collected.
1080 */
1081 -static void collect_some_attrs(const struct index_state *istate,
1081 +static void collect_some_attrs(struct index_state *istate,
1082 const char *path,
1083 struct attr_check *check)
1084 {
@@ -1107,7 +1107,7 @@ static void collect_some_attrs(const struct index_state *istate,
1107 fill(path, pathlen, basename_offset, check->stack, check->all_attrs, rem);
1108 }
1109
1110 -void git_check_attr(const struct index_state *istate,
1110 +void git_check_attr(struct index_state *istate,
1111 const char *path,
1112 struct attr_check *check)
1113 {
@@ -1124,7 +1124,7 @@ void git_check_attr(const struct index_state *istate,
1124 }
1125 }
1126
1127 -void git_all_attrs(const struct index_state *istate,
1127 +void git_all_attrs(struct index_state *istate,
1128 const char *path, struct attr_check *check)
1129 {
1130 int i;
attr.h
+2 -2
@@ -190,14 +190,14 @@ void attr_check_free(struct attr_check *check);
190 */
191 const char *git_attr_name(const struct git_attr *);
192
193 -void git_check_attr(const struct index_state *istate,
193 +void git_check_attr(struct index_state *istate,
194 const char *path, struct attr_check *check);
195
196 /*
197 * Retrieve all attributes that apply to the specified path.
198 * check holds the attributes and their values.
199 */
200 -void git_all_attrs(const struct index_state *istate,
200 +void git_all_attrs(struct index_state *istate,
201 const char *path, struct attr_check *check);
202
203 enum git_attr_direction {
builtin/ls-files.c
+5 -5
@@ -57,7 +57,7 @@ static const char *tag_modified = "";
57 static const char *tag_skip_worktree = "";
58 static const char *tag_resolve_undo = "";
59
60 -static void write_eolinfo(const struct index_state *istate,
60 +static void write_eolinfo(struct index_state *istate,
61 const struct cache_entry *ce, const char *path)
62 {
63 if (show_eol) {
@@ -122,7 +122,7 @@ static void print_debug(const struct cache_entry *ce)
122 }
123 }
124
125 -static void show_dir_entry(const struct index_state *istate,
125 +static void show_dir_entry(struct index_state *istate,
126 const char *tag, struct dir_entry *ent)
127 {
128 int len = max_prefix_len;
@@ -139,7 +139,7 @@ static void show_dir_entry(const struct index_state *istate,
139 write_name(ent->name);
140 }
141
142 -static void show_other_files(const struct index_state *istate,
142 +static void show_other_files(struct index_state *istate,
143 const struct dir_struct *dir)
144 {
145 int i;
@@ -152,7 +152,7 @@ static void show_other_files(const struct index_state *istate,
152 }
153 }
154
155 -static void show_killed_files(const struct index_state *istate,
155 +static void show_killed_files(struct index_state *istate,
156 const struct dir_struct *dir)
157 {
158 int i;
@@ -254,7 +254,7 @@ static void show_ce(struct repository *repo, struct dir_struct *dir,
254 }
255 }
256
257 -static void show_ru_info(const struct index_state *istate)
257 +static void show_ru_info(struct index_state *istate)
258 {
259 struct string_list_item *item;
260
cache.h
+3 -3
@@ -800,7 +800,7 @@ struct cache_entry *index_file_exists(struct index_state *istate, const char *na
800 * index_name_pos(&index, "f", 1) -> -3
801 * index_name_pos(&index, "g", 1) -> -5
802 */
803 -int index_name_pos(const struct index_state *, const char *name, int namelen);
803 +int index_name_pos(struct index_state *, const char *name, int namelen);
804
805 /*
806 * Some functions return the negative complement of an insert position when a
@@ -850,8 +850,8 @@ int add_file_to_index(struct index_state *, const char *path, int flags);
850 int chmod_index_entry(struct index_state *, struct cache_entry *ce, char flip);
851 int ce_same_name(const struct cache_entry *a, const struct cache_entry *b);
852 void set_object_name_for_intent_to_add_entry(struct cache_entry *ce);
853 -int index_name_is_other(const struct index_state *, const char *, int);
854 -void *read_blob_data_from_index(const struct index_state *, const char *, unsigned long *);
853 +int index_name_is_other(struct index_state *, const char *, int);
854 +void *read_blob_data_from_index(struct index_state *, const char *, unsigned long *);
855
856 /* do stat comparison even if CE_VALID is true */
857 #define CE_MATCH_IGNORE_VALID 01
convert.c
+13 -13
@@ -138,7 +138,7 @@ static const char *gather_convert_stats_ascii(const char *data, unsigned long si
138 }
139 }
140
141 -const char *get_cached_convert_stats_ascii(const struct index_state *istate,
141 +const char *get_cached_convert_stats_ascii(struct index_state *istate,
142 const char *path)
143 {
144 const char *ret;
@@ -222,7 +222,7 @@ static void check_global_conv_flags_eol(const char *path,
222 }
223 }
224
225 -static int has_crlf_in_index(const struct index_state *istate, const char *path)
225 +static int has_crlf_in_index(struct index_state *istate, const char *path)
226 {
227 unsigned long sz;
228 void *data;
@@ -496,7 +496,7 @@ static int encode_to_worktree(const char *path, const char *src, size_t src_len,
496 return 1;
497 }
498
499 -static int crlf_to_git(const struct index_state *istate,
499 +static int crlf_to_git(struct index_state *istate,
500 const char *path, const char *src, size_t len,
501 struct strbuf *buf,
502 enum crlf_action crlf_action, int conv_flags)
@@ -1307,7 +1307,7 @@ struct conv_attrs {
1307
1308 static struct attr_check *check;
1309
1310 -static void convert_attrs(const struct index_state *istate,
1310 +static void convert_attrs(struct index_state *istate,
1311 struct conv_attrs *ca, const char *path)
1312 {
1313 struct attr_check_item *ccheck = NULL;
@@ -1369,7 +1369,7 @@ void reset_parsed_attributes(void)
1369 user_convert_tail = NULL;
1370 }
1371
1372 -int would_convert_to_git_filter_fd(const struct index_state *istate, const char *path)
1372 +int would_convert_to_git_filter_fd(struct index_state *istate, const char *path)
1373 {
1374 struct conv_attrs ca;
1375
@@ -1388,7 +1388,7 @@ int would_convert_to_git_filter_fd(const struct index_state *istate, const char
1388 return apply_filter(path, NULL, 0, -1, NULL, ca.drv, CAP_CLEAN, NULL, NULL);
1389 }
1390
1391 -const char *get_convert_attr_ascii(const struct index_state *istate, const char *path)
1391 +const char *get_convert_attr_ascii(struct index_state *istate, const char *path)
1392 {
1393 struct conv_attrs ca;
1394
@@ -1414,7 +1414,7 @@ const char *get_convert_attr_ascii(const struct index_state *istate, const char
1414 return "";
1415 }
1416
1417 -int convert_to_git(const struct index_state *istate,
1417 +int convert_to_git(struct index_state *istate,
1418 const char *path, const char *src, size_t len,
1419 struct strbuf *dst, int conv_flags)
1420 {
@@ -1448,7 +1448,7 @@ int convert_to_git(const struct index_state *istate,
1448 return ret | ident_to_git(src, len, dst, ca.ident);
1449 }
1450
1451 -void convert_to_git_filter_fd(const struct index_state *istate,
1451 +void convert_to_git_filter_fd(struct index_state *istate,
1452 const char *path, int fd, struct strbuf *dst,
1453 int conv_flags)
1454 {
@@ -1466,7 +1466,7 @@ void convert_to_git_filter_fd(const struct index_state *istate,
1466 ident_to_git(dst->buf, dst->len, dst, ca.ident);
1467 }
1468
1469 -static int convert_to_working_tree_internal(const struct index_state *istate,
1469 +static int convert_to_working_tree_internal(struct index_state *istate,
1470 const char *path, const char *src,
1471 size_t len, struct strbuf *dst,
1472 int normalizing,
@@ -1510,7 +1510,7 @@ static int convert_to_working_tree_internal(const struct index_state *istate,
1510 return ret | ret_filter;
1511 }
1512
1513 -int async_convert_to_working_tree(const struct index_state *istate,
1513 +int async_convert_to_working_tree(struct index_state *istate,
1514 const char *path, const char *src,
1515 size_t len, struct strbuf *dst,
1516 const struct checkout_metadata *meta,
@@ -1519,7 +1519,7 @@ int async_convert_to_working_tree(const struct index_state *istate,
1519 return convert_to_working_tree_internal(istate, path, src, len, dst, 0, meta, dco);
1520 }
1521
1522 -int convert_to_working_tree(const struct index_state *istate,
1522 +int convert_to_working_tree(struct index_state *istate,
1523 const char *path, const char *src,
1524 size_t len, struct strbuf *dst,
1525 const struct checkout_metadata *meta)
@@ -1527,7 +1527,7 @@ int convert_to_working_tree(const struct index_state *istate,
1527 return convert_to_working_tree_internal(istate, path, src, len, dst, 0, meta, NULL);
1528 }
1529
1530 -int renormalize_buffer(const struct index_state *istate, const char *path,
1530 +int renormalize_buffer(struct index_state *istate, const char *path,
1531 const char *src, size_t len, struct strbuf *dst)
1532 {
1533 int ret = convert_to_working_tree_internal(istate, path, src, len, dst, 1, NULL, NULL);
@@ -1964,7 +1964,7 @@ static struct stream_filter *ident_filter(const struct object_id *oid)
1964 * Note that you would be crazy to set CRLF, smudge/clean or ident to a
1965 * large binary blob you would want us not to slurp into the memory!
1966 */
1967 -struct stream_filter *get_stream_filter(const struct index_state *istate,
1967 +struct stream_filter *get_stream_filter(struct index_state *istate,
1968 const char *path,
1969 const struct object_id *oid)
1970 {
convert.h
+10 -10
@@ -65,41 +65,41 @@ struct checkout_metadata {
65
66 extern enum eol core_eol;
67 extern char *check_roundtrip_encoding;
68 -const char *get_cached_convert_stats_ascii(const struct index_state *istate,
68 +const char *get_cached_convert_stats_ascii(struct index_state *istate,
69 const char *path);
70 const char *get_wt_convert_stats_ascii(const char *path);
71 -const char *get_convert_attr_ascii(const struct index_state *istate,
71 +const char *get_convert_attr_ascii(struct index_state *istate,
72 const char *path);
73
74 /* returns 1 if *dst was used */
75 -int convert_to_git(const struct index_state *istate,
75 +int convert_to_git(struct index_state *istate,
76 const char *path, const char *src, size_t len,
77 struct strbuf *dst, int conv_flags);
78 -int convert_to_working_tree(const struct index_state *istate,
78 +int convert_to_working_tree(struct index_state *istate,
79 const char *path, const char *src,
80 size_t len, struct strbuf *dst,
81 const struct checkout_metadata *meta);
82 -int async_convert_to_working_tree(const struct index_state *istate,
82 +int async_convert_to_working_tree(struct index_state *istate,
83 const char *path, const char *src,
84 size_t len, struct strbuf *dst,
85 const struct checkout_metadata *meta,
86 void *dco);
87 int async_query_available_blobs(const char *cmd,
88 struct string_list *available_paths);
89 -int renormalize_buffer(const struct index_state *istate,
89 +int renormalize_buffer(struct index_state *istate,
90 const char *path, const char *src, size_t len,
91 struct strbuf *dst);
92 -static inline int would_convert_to_git(const struct index_state *istate,
92 +static inline int would_convert_to_git(struct index_state *istate,
93 const char *path)
94 {
95 return convert_to_git(istate, path, NULL, 0, NULL, 0);
96 }
97 /* Precondition: would_convert_to_git_filter_fd(path) == true */
98 -void convert_to_git_filter_fd(const struct index_state *istate,
98 +void convert_to_git_filter_fd(struct index_state *istate,
99 const char *path, int fd,
100 struct strbuf *dst,
101 int conv_flags);
102 -int would_convert_to_git_filter_fd(const struct index_state *istate,
102 +int would_convert_to_git_filter_fd(struct index_state *istate,
103 const char *path);
104
105 /*
@@ -133,7 +133,7 @@ void reset_parsed_attributes(void);
133
134 struct stream_filter; /* opaque */
135
136 -struct stream_filter *get_stream_filter(const struct index_state *istate,
136 +struct stream_filter *get_stream_filter(struct index_state *istate,
137 const char *path,
138 const struct object_id *);
139 void free_stream_filter(struct stream_filter *);
dir.c
+6 -6
@@ -306,7 +306,7 @@ static int do_read_blob(const struct object_id *oid, struct oid_stat *oid_stat,
306 * [1] Only if DO_MATCH_DIRECTORY is passed; otherwise, this is NOT a match.
307 * [2] Only if DO_MATCH_LEADING_PATHSPEC is passed; otherwise, not a match.
308 */
309 -static int match_pathspec_item(const struct index_state *istate,
309 +static int match_pathspec_item(struct index_state *istate,
310 const struct pathspec_item *item, int prefix,
311 const char *name, int namelen, unsigned flags)
312 {
@@ -429,7 +429,7 @@ static int match_pathspec_item(const struct index_state *istate,
429 * pathspec did not match any names, which could indicate that the
430 * user mistyped the nth pathspec.
431 */
432 -static int do_match_pathspec(const struct index_state *istate,
432 +static int do_match_pathspec(struct index_state *istate,
433 const struct pathspec *ps,
434 const char *name, int namelen,
435 int prefix, char *seen,
@@ -500,7 +500,7 @@ static int do_match_pathspec(const struct index_state *istate,
500 return retval;
501 }
502
503 -static int match_pathspec_with_flags(const struct index_state *istate,
503 +static int match_pathspec_with_flags(struct index_state *istate,
504 const struct pathspec *ps,
505 const char *name, int namelen,
506 int prefix, char *seen, unsigned flags)
@@ -516,7 +516,7 @@ static int match_pathspec_with_flags(const struct index_state *istate,
516 return negative ? 0 : positive;
517 }
518
519 -int match_pathspec(const struct index_state *istate,
519 +int match_pathspec(struct index_state *istate,
520 const struct pathspec *ps,
521 const char *name, int namelen,
522 int prefix, char *seen, int is_dir)
@@ -529,7 +529,7 @@ int match_pathspec(const struct index_state *istate,
529 /**
530 * Check if a submodule is a superset of the pathspec
531 */
532 -int submodule_path_match(const struct index_state *istate,
532 +int submodule_path_match(struct index_state *istate,
533 const struct pathspec *ps,
534 const char *submodule_name,
535 char *seen)
@@ -892,7 +892,7 @@ void add_pattern(const char *string, const char *base,
892 add_pattern_to_hashsets(pl, pattern);
893 }
894
895 -static int read_skip_worktree_file_from_index(const struct index_state *istate,
895 +static int read_skip_worktree_file_from_index(struct index_state *istate,
896 const char *path,
897 size_t *size_out, char **data_out,
898 struct oid_stat *oid_stat)
dir.h
+4 -4
@@ -354,7 +354,7 @@ int count_slashes(const char *s);
354 int simple_length(const char *match);
355 int no_wildcard(const char *string);
356 char *common_prefix(const struct pathspec *pathspec);
357 -int match_pathspec(const struct index_state *istate,
357 +int match_pathspec(struct index_state *istate,
358 const struct pathspec *pathspec,
359 const char *name, int namelen,
360 int prefix, char *seen, int is_dir);
@@ -492,12 +492,12 @@ int git_fnmatch(const struct pathspec_item *item,
492 const char *pattern, const char *string,
493 int prefix);
494
495 -int submodule_path_match(const struct index_state *istate,
495 +int submodule_path_match(struct index_state *istate,
496 const struct pathspec *ps,
497 const char *submodule_name,
498 char *seen);
499
500 -static inline int ce_path_match(const struct index_state *istate,
500 +static inline int ce_path_match(struct index_state *istate,
501 const struct cache_entry *ce,
502 const struct pathspec *pathspec,
503 char *seen)
@@ -506,7 +506,7 @@ static inline int ce_path_match(const struct index_state *istate,
506 S_ISDIR(ce->ce_mode) || S_ISGITLINK(ce->ce_mode));
507 }
508
509 -static inline int dir_path_match(const struct index_state *istate,
509 +static inline int dir_path_match(struct index_state *istate,
510 const struct dir_entry *ent,
511 const struct pathspec *pathspec,
512 int prefix, char *seen)
merge-recursive.c
+1 -1
@@ -2987,7 +2987,7 @@ static int blob_unchanged(struct merge_options *opt,
2987 struct strbuf obuf = STRBUF_INIT;
2988 struct strbuf abuf = STRBUF_INIT;
2989 int ret = 0; /* assume changed for safety */
2990 - const struct index_state *idx = opt->repo->index;
2990 + struct index_state *idx = opt->repo->index;
2991
2992 if (a->mode != o->mode)
2993 return 0;
pathspec.c
+3 -3
@@ -20,7 +20,7 @@
20 * to use find_pathspecs_matching_against_index() instead.
21 */
22 void add_pathspec_matches_against_index(const struct pathspec *pathspec,
23 - const struct index_state *istate,
23 + struct index_state *istate,
24 char *seen)
25 {
26 int num_unmatched = 0, i;
@@ -51,7 +51,7 @@ void add_pathspec_matches_against_index(const struct pathspec *pathspec,
51 * given pathspecs achieves against all items in the index.
52 */
53 char *find_pathspecs_matching_against_index(const struct pathspec *pathspec,
54 - const struct index_state *istate)
54 + struct index_state *istate)
55 {
56 char *seen = xcalloc(pathspec->nr, 1);
57 add_pathspec_matches_against_index(pathspec, istate, seen);
@@ -702,7 +702,7 @@ void clear_pathspec(struct pathspec *pathspec)
702 pathspec->nr = 0;
703 }
704
705 -int match_pathspec_attrs(const struct index_state *istate,
705 +int match_pathspec_attrs(struct index_state *istate,
706 const char *name, int namelen,
707 const struct pathspec_item *item)
708 {
pathspec.h
+3 -3
@@ -150,11 +150,11 @@ static inline int ps_strcmp(const struct pathspec_item *item,
150 }
151
152 void add_pathspec_matches_against_index(const struct pathspec *pathspec,
153 - const struct index_state *istate,
153 + struct index_state *istate,
154 char *seen);
155 char *find_pathspecs_matching_against_index(const struct pathspec *pathspec,
156 - const struct index_state *istate);
157 -int match_pathspec_attrs(const struct index_state *istate,
156 + struct index_state *istate);
157 +int match_pathspec_attrs(struct index_state *istate,
158 const char *name, int namelen,
159 const struct pathspec_item *item);
160
read-cache.c
+5 -5
@@ -549,7 +549,7 @@ int cache_name_stage_compare(const char *name1, int len1, int stage1, const char
549 return 0;
550 }
551
552 -static int index_name_stage_pos(const struct index_state *istate, const char *name, int namelen, int stage)
552 +static int index_name_stage_pos(struct index_state *istate, const char *name, int namelen, int stage)
553 {
554 int first, last;
555
@@ -570,7 +570,7 @@ static int index_name_stage_pos(const struct index_state *istate, const char *na
570 return -first-1;
571 }
572
573 -int index_name_pos(const struct index_state *istate, const char *name, int namelen)
573 +int index_name_pos(struct index_state *istate, const char *name, int namelen)
574 {
575 return index_name_stage_pos(istate, name, namelen, 0);
576 }
@@ -3389,8 +3389,8 @@ int repo_read_index_unmerged(struct repository *repo)
3389 * We helpfully remove a trailing "/" from directories so that
3390 * the output of read_directory can be used as-is.
3391 */
3392 -int index_name_is_other(const struct index_state *istate, const char *name,
3393 - int namelen)
3392 +int index_name_is_other(struct index_state *istate, const char *name,
3393 + int namelen)
3394 {
3395 int pos;
3396 if (namelen && name[namelen - 1] == '/')
@@ -3408,7 +3408,7 @@ int index_name_is_other(const struct index_state *istate, const char *name,
3408 return 1;
3409 }
3410
3411 -void *read_blob_data_from_index(const struct index_state *istate,
3411 +void *read_blob_data_from_index(struct index_state *istate,
3412 const char *path, unsigned long *size)
3413 {
3414 int pos, len;
submodule.c
+3 -3
@@ -33,7 +33,7 @@ static struct oid_array ref_tips_after_fetch;
33 * will be disabled because we can't guess what might be configured in
34 * .gitmodules unless the user resolves the conflict.
35 */
36 -int is_gitmodules_unmerged(const struct index_state *istate)
36 +int is_gitmodules_unmerged(struct index_state *istate)
37 {
38 int pos = index_name_pos(istate, GITMODULES_FILE, strlen(GITMODULES_FILE));
39 if (pos < 0) { /* .gitmodules not found or isn't merged */
@@ -301,7 +301,7 @@ int is_submodule_populated_gently(const char *path, int *return_error_code)
301 /*
302 * Dies if the provided 'prefix' corresponds to an unpopulated submodule
303 */
304 -void die_in_unpopulated_submodule(const struct index_state *istate,
304 +void die_in_unpopulated_submodule(struct index_state *istate,
305 const char *prefix)
306 {
307 int i, prefixlen;
@@ -331,7 +331,7 @@ void die_in_unpopulated_submodule(const struct index_state *istate,
331 /*
332 * Dies if any paths in the provided pathspec descends into a submodule
333 */
334 -void die_path_inside_submodule(const struct index_state *istate,
334 +void die_path_inside_submodule(struct index_state *istate,
335 const struct pathspec *ps)
336 {
337 int i, j;
submodule.h
+3 -3
@@ -39,7 +39,7 @@ struct submodule_update_strategy {
39 };
40 #define SUBMODULE_UPDATE_STRATEGY_INIT {SM_UPDATE_UNSPECIFIED, NULL}
41
42 -int is_gitmodules_unmerged(const struct index_state *istate);
42 +int is_gitmodules_unmerged(struct index_state *istate);
43 int is_writing_gitmodules_ok(void);
44 int is_staging_gitmodules_ok(struct index_state *istate);
45 int update_path_in_gitmodules(const char *oldpath, const char *newpath);
@@ -60,9 +60,9 @@ int is_submodule_active(struct repository *repo, const char *path);
60 * Otherwise the return error code is the same as of resolve_gitdir_gently.
61 */
62 int is_submodule_populated_gently(const char *path, int *return_error_code);
63 -void die_in_unpopulated_submodule(const struct index_state *istate,
63 +void die_in_unpopulated_submodule(struct index_state *istate,
64 const char *prefix);
65 -void die_path_inside_submodule(const struct index_state *istate,
65 +void die_path_inside_submodule(struct index_state *istate,
66 const struct pathspec *ps);
67 enum submodule_update_type parse_submodule_update_type(const char *value);
68 int parse_submodule_update_strategy(const char *value,