summaryrefslogtreecommitdiff
path: root/submodule.c
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2021-04-01 01:49:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-04-14 20:46:00 (GMT)
commit847a9e5d4f876646e128c89f0818b1a8ce792509 (patch)
treedc3a36fbfcc5d0384093da4bc75bef39f4b73bac /submodule.c
parent839a66349e094a28f29577a8b311491b9d6b907b (diff)
downloadgit-847a9e5d4f876646e128c89f0818b1a8ce792509.zip
git-847a9e5d4f876646e128c89f0818b1a8ce792509.tar.gz
git-847a9e5d4f876646e128c89f0818b1a8ce792509.tar.bz2
*: 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.c')
-rw-r--r--submodule.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/submodule.c b/submodule.c
index 9767ba9..83809a4 100644
--- a/submodule.c
+++ b/submodule.c
@@ -33,7 +33,7 @@ static struct oid_array ref_tips_after_fetch;
* will be disabled because we can't guess what might be configured in
* .gitmodules unless the user resolves the conflict.
*/
-int is_gitmodules_unmerged(const struct index_state *istate)
+int is_gitmodules_unmerged(struct index_state *istate)
{
int pos = index_name_pos(istate, GITMODULES_FILE, strlen(GITMODULES_FILE));
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)
/*
* Dies if the provided 'prefix' corresponds to an unpopulated submodule
*/
-void die_in_unpopulated_submodule(const struct index_state *istate,
+void die_in_unpopulated_submodule(struct index_state *istate,
const char *prefix)
{
int i, prefixlen;
@@ -331,7 +331,7 @@ void die_in_unpopulated_submodule(const struct index_state *istate,
/*
* Dies if any paths in the provided pathspec descends into a submodule
*/
-void die_path_inside_submodule(const struct index_state *istate,
+void die_path_inside_submodule(struct index_state *istate,
const struct pathspec *ps)
{
int i, j;