diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2021-04-01 03:49:39 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-04-14 22:46:00 +0200 |
commit | 847a9e5d4f876646e128c89f0818b1a8ce792509 (patch) | |
tree | dc3a36fbfcc5d0384093da4bc75bef39f4b73bac /submodule.h | |
parent | sparse-index: API protection strategy (diff) | |
download | git-847a9e5d4f876646e128c89f0818b1a8ce792509.tar.xz git-847a9e5d4f876646e128c89f0818b1a8ce792509.zip |
*: 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>
Diffstat (limited to 'submodule.h')
-rw-r--r-- | submodule.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/submodule.h b/submodule.h index 4ac6e31cf1..84640c49c1 100644 --- a/submodule.h +++ b/submodule.h @@ -39,7 +39,7 @@ struct submodule_update_strategy { }; #define SUBMODULE_UPDATE_STRATEGY_INIT {SM_UPDATE_UNSPECIFIED, NULL} -int is_gitmodules_unmerged(const struct index_state *istate); +int is_gitmodules_unmerged(struct index_state *istate); int is_writing_gitmodules_ok(void); int is_staging_gitmodules_ok(struct index_state *istate); 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); * Otherwise the return error code is the same as of resolve_gitdir_gently. */ int is_submodule_populated_gently(const char *path, int *return_error_code); -void die_in_unpopulated_submodule(const struct index_state *istate, +void die_in_unpopulated_submodule(struct index_state *istate, const char *prefix); -void die_path_inside_submodule(const struct index_state *istate, +void die_path_inside_submodule(struct index_state *istate, const struct pathspec *ps); enum submodule_update_type parse_submodule_update_type(const char *value); int parse_submodule_update_strategy(const char *value, |