submodule: add an ignore option to status This lets us specify in the status call which ignore rules we want to use (optionally falling back to whatever the submodule has in its configuration). This removes one of the reasons for having `_set_ignore()` set the value in-memory. We re-use the `IGNORE_RESET` value for this as it is no longer relevant but has a similar purpose to `IGNORE_FALLBACK`. Similarly, we remove `IGNORE_DEFAULT` which does not have use outside of initializers and move that to fall back to the configuration as well.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413
diff --git a/include/git2/diff.h b/include/git2/diff.h
index 0ecdc1b..90e2e1b 100644
--- a/include/git2/diff.h
+++ b/include/git2/diff.h
@@ -399,7 +399,7 @@ typedef struct {
* `git_diff_options_init` programmatic initialization.
*/
#define GIT_DIFF_OPTIONS_INIT \
- {GIT_DIFF_OPTIONS_VERSION, 0, GIT_SUBMODULE_IGNORE_DEFAULT, {NULL,0}, NULL, NULL, 3}
+ {GIT_DIFF_OPTIONS_VERSION, 0, GIT_SUBMODULE_IGNORE_FALLBACK, {NULL,0}, NULL, NULL, 3}
/**
* Initializes a `git_diff_options` with default values. Equivalent to
diff --git a/include/git2/submodule.h b/include/git2/submodule.h
index 7375708..31218cc 100644
--- a/include/git2/submodule.h
+++ b/include/git2/submodule.h
@@ -631,12 +631,14 @@ GIT_EXTERN(int) git_submodule_reload_all(git_repository *repo, int force);
* @param status Combination of `GIT_SUBMODULE_STATUS` flags
* @param repo the repository in which to look
* @param name name of the submodule
+ * @param ignore the ignore rules to follow
* @return 0 on success, <0 on error
*/
GIT_EXTERN(int) git_submodule_status(
unsigned int *status,
git_repository *repo,
- const char *name);
+ const char *name,
+ git_submodule_ignore_t ignore);
/**
* Get the locations of submodule information.
diff --git a/include/git2/types.h b/include/git2/types.h
index d1e7cd9..aa0f31a 100644
--- a/include/git2/types.h
+++ b/include/git2/types.h
@@ -374,7 +374,7 @@ typedef enum {
*
* The values are:
*
- * - GIT_SUBMODULE_IGNORE_RESET: reset to the on-disk value.
+ * - GIT_SUBMODULE_IGNORE_FALLBACK: use the submodule's configuration
* - GIT_SUBMODULE_IGNORE_NONE: don't ignore any change - i.e. even an
* untracked file, will mark the submodule as dirty. Ignored files are
* still ignored, of course.
@@ -388,14 +388,12 @@ typedef enum {
* when we don't want any particular ignore rule to be specified.
*/
typedef enum {
- GIT_SUBMODULE_IGNORE_RESET = -1, /**< reset to on-disk value */
+ GIT_SUBMODULE_IGNORE_FALLBACK = -1, /**< use the submodule's configuration */
GIT_SUBMODULE_IGNORE_NONE = 1, /**< any change or untracked == dirty */
GIT_SUBMODULE_IGNORE_UNTRACKED = 2, /**< dirty if tracked files change */
GIT_SUBMODULE_IGNORE_DIRTY = 3, /**< only dirty if HEAD moved */
GIT_SUBMODULE_IGNORE_ALL = 4, /**< never dirty */
-
- GIT_SUBMODULE_IGNORE_DEFAULT = 0
} git_submodule_ignore_t;
/**
diff --git a/src/checkout.c b/src/checkout.c
index d95244a..351e8b0 100644
--- a/src/checkout.c
+++ b/src/checkout.c
@@ -180,7 +180,7 @@ static bool checkout_is_workdir_modified(
return true;
}
- if (git_submodule_status(&sm_status, data->repo, wditem->path) < 0 ||
+ if (git_submodule_status(&sm_status, data->repo, wditem->path, GIT_SUBMODULE_IGNORE_FALLBACK) < 0 ||
GIT_SUBMODULE_STATUS_IS_WD_DIRTY(sm_status))
rval = true;
else if ((sm_oid = git_submodule_wd_id(sm)) == NULL)
diff --git a/src/diff_file.c b/src/diff_file.c
index 4d9ecc8..28edcd4 100644
--- a/src/diff_file.c
+++ b/src/diff_file.c
@@ -186,7 +186,7 @@ static int diff_file_content_commit_to_str(
return error;
}
- if ((error = git_submodule_status(&sm_status, fc->repo, fc->file->path)) < 0) {
+ if ((error = git_submodule_status(&sm_status, fc->repo, fc->file->path, GIT_SUBMODULE_IGNORE_FALLBACK)) < 0) {
git_submodule_free(sm);
return error;
}
diff --git a/src/submodule.c b/src/submodule.c
index 2faaa73..c6effde 100644
--- a/src/submodule.c
+++ b/src/submodule.c
@@ -1067,7 +1067,7 @@ int git_submodule_update(git_submodule *sm, int init, git_submodule_update_optio
memcpy(&clone_options.fetch_opts, &update_options.fetch_opts, sizeof(git_fetch_options));
/* Get the status of the submodule to determine if it is already initialized */
- if ((error = git_submodule_status(&submodule_status, sm->repo, sm->name)) < 0)
+ if ((error = git_submodule_status(&submodule_status, sm->repo, sm->name, GIT_SUBMODULE_IGNORE_FALLBACK)) < 0)
goto done;
/*
@@ -1462,7 +1462,7 @@ int git_submodule__status(
unsigned int status;
git_repository *smrepo = NULL;
- if (ign < GIT_SUBMODULE_IGNORE_NONE)
+ if (ign == GIT_SUBMODULE_IGNORE_FALLBACK)
ign = sm->ignore;
/* only return location info if ignore == all */
@@ -1511,7 +1511,7 @@ int git_submodule__status(
return 0;
}
-int git_submodule_status(unsigned int *status, git_repository *repo, const char *name)
+int git_submodule_status(unsigned int *status, git_repository *repo, const char *name, git_submodule_ignore_t ignore)
{
git_submodule *sm;
int error;
@@ -1521,7 +1521,7 @@ int git_submodule_status(unsigned int *status, git_repository *repo, const char
if ((error = git_submodule_lookup(&sm, repo, name)) < 0)
return error;
- error = git_submodule__status(status, NULL, NULL, NULL, sm, 0);
+ error = git_submodule__status(status, NULL, NULL, NULL, sm, ignore);
git_submodule_free(sm);
return error;
diff --git a/tests/diff/tree.c b/tests/diff/tree.c
index 6dd1720..977e21f 100644
--- a/tests/diff/tree.c
+++ b/tests/diff/tree.c
@@ -89,7 +89,7 @@ void test_diff_tree__0(void)
}
#define DIFF_OPTS(FLAGS, CTXT) \
- {GIT_DIFF_OPTIONS_VERSION, (FLAGS), GIT_SUBMODULE_IGNORE_DEFAULT, \
+ {GIT_DIFF_OPTIONS_VERSION, (FLAGS), GIT_SUBMODULE_IGNORE_FALLBACK, \
{NULL,0}, NULL, NULL, (CTXT), 1}
void test_diff_tree__options(void)
diff --git a/tests/submodule/status.c b/tests/submodule/status.c
index 4d51d8d..6721ee9 100644
--- a/tests/submodule/status.c
+++ b/tests/submodule/status.c
@@ -107,56 +107,47 @@ void test_submodule_status__ignore_none(void)
cl_assert((status & GIT_SUBMODULE_STATUS_INDEX_DELETED) != 0);
}
-static int set_sm_ignore(git_submodule *sm, const char *name, void *payload)
-{
- git_submodule_ignore_t ignore = *(git_submodule_ignore_t *)payload;
- GIT_UNUSED(name);
- git_submodule_set_ignore(g_repo, git_submodule_name(sm), ignore);
- return 0;
-}
-
void test_submodule_status__ignore_untracked(void)
{
unsigned int status;
git_submodule_ignore_t ign = GIT_SUBMODULE_IGNORE_UNTRACKED;
rm_submodule("sm_unchanged");
- cl_git_pass(git_submodule_foreach(g_repo, set_sm_ignore, &ign));
refute_submodule_exists(g_repo, "just_a_dir", GIT_ENOTFOUND);
refute_submodule_exists(g_repo, "not-submodule", GIT_EEXISTS);
refute_submodule_exists(g_repo, "not", GIT_EEXISTS);
- status = get_submodule_status(g_repo, "sm_changed_index");
+ cl_git_pass(git_submodule_status(&status, g_repo,"sm_changed_index", ign));
cl_assert((status & GIT_SUBMODULE_STATUS_WD_INDEX_MODIFIED) != 0);
- status = get_submodule_status(g_repo, "sm_changed_head");
+ cl_git_pass(git_submodule_status(&status, g_repo,"sm_changed_head", ign));
cl_assert((status & GIT_SUBMODULE_STATUS_WD_MODIFIED) != 0);
- status = get_submodule_status(g_repo, "sm_changed_file");
+ cl_git_pass(git_submodule_status(&status, g_repo,"sm_changed_file", ign));
cl_assert((status & GIT_SUBMODULE_STATUS_WD_WD_MODIFIED) != 0);
- status = get_submodule_status(g_repo, "sm_changed_untracked_file");
+ cl_git_pass(git_submodule_status(&status, g_repo,"sm_changed_untracked_file", ign));
cl_assert(GIT_SUBMODULE_STATUS_IS_UNMODIFIED(status));
- status = get_submodule_status(g_repo, "sm_missing_commits");
+ cl_git_pass(git_submodule_status(&status, g_repo,"sm_missing_commits", ign));
cl_assert((status & GIT_SUBMODULE_STATUS_WD_MODIFIED) != 0);
- status = get_submodule_status(g_repo, "sm_added_and_uncommited");
+ cl_git_pass(git_submodule_status(&status, g_repo,"sm_added_and_uncommited", ign));
cl_assert((status & GIT_SUBMODULE_STATUS_INDEX_ADDED) != 0);
/* removed sm_unchanged for deleted workdir */
- status = get_submodule_status(g_repo, "sm_unchanged");
+ cl_git_pass(git_submodule_status(&status, g_repo,"sm_unchanged", ign));
cl_assert((status & GIT_SUBMODULE_STATUS_WD_DELETED) != 0);
/* now mkdir sm_unchanged to test uninitialized */
cl_git_pass(git_futils_mkdir("sm_unchanged", "submod2", 0755, 0));
- status = get_submodule_status(g_repo, "sm_unchanged");
+ cl_git_pass(git_submodule_status(&status, g_repo,"sm_unchanged", ign));
cl_assert((status & GIT_SUBMODULE_STATUS_WD_UNINITIALIZED) != 0);
/* update sm_changed_head in index */
add_submodule_to_index("sm_changed_head");
- status = get_submodule_status(g_repo, "sm_changed_head");
+ cl_git_pass(git_submodule_status(&status, g_repo,"sm_changed_head", ign));
cl_assert((status & GIT_SUBMODULE_STATUS_INDEX_MODIFIED) != 0);
}
@@ -166,42 +157,41 @@ void test_submodule_status__ignore_dirty(void)
git_submodule_ignore_t ign = GIT_SUBMODULE_IGNORE_DIRTY;
rm_submodule("sm_unchanged");
- cl_git_pass(git_submodule_foreach(g_repo, set_sm_ignore, &ign));
refute_submodule_exists(g_repo, "just_a_dir", GIT_ENOTFOUND);
refute_submodule_exists(g_repo, "not-submodule", GIT_EEXISTS);
refute_submodule_exists(g_repo, "not", GIT_EEXISTS);
- status = get_submodule_status(g_repo, "sm_changed_index");
+ cl_git_pass(git_submodule_status(&status, g_repo,"sm_changed_index", ign));
cl_assert(GIT_SUBMODULE_STATUS_IS_UNMODIFIED(status));
- status = get_submodule_status(g_repo, "sm_changed_head");
+ cl_git_pass(git_submodule_status(&status, g_repo,"sm_changed_head", ign));
cl_assert((status & GIT_SUBMODULE_STATUS_WD_MODIFIED) != 0);
- status = get_submodule_status(g_repo, "sm_changed_file");
+ cl_git_pass(git_submodule_status(&status, g_repo,"sm_changed_file", ign));
cl_assert(GIT_SUBMODULE_STATUS_IS_UNMODIFIED(status));
- status = get_submodule_status(g_repo, "sm_changed_untracked_file");
+ cl_git_pass(git_submodule_status(&status, g_repo,"sm_changed_untracked_file", ign));
cl_assert(GIT_SUBMODULE_STATUS_IS_UNMODIFIED(status));
- status = get_submodule_status(g_repo, "sm_missing_commits");
+ cl_git_pass(git_submodule_status(&status, g_repo,"sm_missing_commits", ign));
cl_assert((status & GIT_SUBMODULE_STATUS_WD_MODIFIED) != 0);
- status = get_submodule_status(g_repo, "sm_added_and_uncommited");
+ cl_git_pass(git_submodule_status(&status, g_repo,"sm_added_and_uncommited", ign));
cl_assert((status & GIT_SUBMODULE_STATUS_INDEX_ADDED) != 0);
/* removed sm_unchanged for deleted workdir */
- status = get_submodule_status(g_repo, "sm_unchanged");
+ cl_git_pass(git_submodule_status(&status, g_repo,"sm_unchanged", ign));
cl_assert((status & GIT_SUBMODULE_STATUS_WD_DELETED) != 0);
/* now mkdir sm_unchanged to test uninitialized */
cl_git_pass(git_futils_mkdir("sm_unchanged", "submod2", 0755, 0));
- status = get_submodule_status(g_repo, "sm_unchanged");
+ cl_git_pass(git_submodule_status(&status, g_repo,"sm_unchanged", ign));
cl_assert((status & GIT_SUBMODULE_STATUS_WD_UNINITIALIZED) != 0);
/* update sm_changed_head in index */
add_submodule_to_index("sm_changed_head");
- status = get_submodule_status(g_repo, "sm_changed_head");
+ cl_git_pass(git_submodule_status(&status, g_repo,"sm_changed_head", ign));
cl_assert((status & GIT_SUBMODULE_STATUS_INDEX_MODIFIED) != 0);
}
@@ -211,42 +201,41 @@ void test_submodule_status__ignore_all(void)
git_submodule_ignore_t ign = GIT_SUBMODULE_IGNORE_ALL;
rm_submodule("sm_unchanged");
- cl_git_pass(git_submodule_foreach(g_repo, set_sm_ignore, &ign));
refute_submodule_exists(g_repo, "just_a_dir", GIT_ENOTFOUND);
refute_submodule_exists(g_repo, "not-submodule", GIT_EEXISTS);
refute_submodule_exists(g_repo, "not", GIT_EEXISTS);
- status = get_submodule_status(g_repo, "sm_changed_index");
+ cl_git_pass(git_submodule_status(&status, g_repo,"sm_changed_index", ign));
cl_assert(GIT_SUBMODULE_STATUS_IS_UNMODIFIED(status));
- status = get_submodule_status(g_repo, "sm_changed_head");
+ cl_git_pass(git_submodule_status(&status, g_repo,"sm_changed_head", ign));
cl_assert(GIT_SUBMODULE_STATUS_IS_UNMODIFIED(status));
- status = get_submodule_status(g_repo, "sm_changed_file");
+ cl_git_pass(git_submodule_status(&status, g_repo,"sm_changed_file", ign));
cl_assert(GIT_SUBMODULE_STATUS_IS_UNMODIFIED(status));
- status = get_submodule_status(g_repo, "sm_changed_untracked_file");
+ cl_git_pass(git_submodule_status(&status, g_repo,"sm_changed_untracked_file", ign));
cl_assert(GIT_SUBMODULE_STATUS_IS_UNMODIFIED(status));
- status = get_submodule_status(g_repo, "sm_missing_commits");
+ cl_git_pass(git_submodule_status(&status, g_repo,"sm_missing_commits", ign));
cl_assert(GIT_SUBMODULE_STATUS_IS_UNMODIFIED(status));
- status = get_submodule_status(g_repo, "sm_added_and_uncommited");
+ cl_git_pass(git_submodule_status(&status, g_repo,"sm_added_and_uncommited", ign));
cl_assert(GIT_SUBMODULE_STATUS_IS_UNMODIFIED(status));
/* removed sm_unchanged for deleted workdir */
- status = get_submodule_status(g_repo, "sm_unchanged");
+ cl_git_pass(git_submodule_status(&status, g_repo,"sm_unchanged", ign));
cl_assert(GIT_SUBMODULE_STATUS_IS_UNMODIFIED(status));
/* now mkdir sm_unchanged to test uninitialized */
cl_git_pass(git_futils_mkdir("sm_unchanged", "submod2", 0755, 0));
- status = get_submodule_status(g_repo, "sm_unchanged");
+ cl_git_pass(git_submodule_status(&status, g_repo,"sm_unchanged", ign));
cl_assert(GIT_SUBMODULE_STATUS_IS_UNMODIFIED(status));
/* update sm_changed_head in index */
add_submodule_to_index("sm_changed_head");
- status = get_submodule_status(g_repo, "sm_changed_head");
+ cl_git_pass(git_submodule_status(&status, g_repo,"sm_changed_head", ign));
cl_assert(GIT_SUBMODULE_STATUS_IS_UNMODIFIED(status));
}
diff --git a/tests/submodule/submodule_helpers.c b/tests/submodule/submodule_helpers.c
index 3683822..d5e0236 100644
--- a/tests/submodule/submodule_helpers.c
+++ b/tests/submodule/submodule_helpers.c
@@ -168,7 +168,7 @@ unsigned int get_submodule_status(git_repository *repo, const char *name)
assert(repo && name);
- cl_git_pass(git_submodule_status(&status, repo, name));
+ cl_git_pass(git_submodule_status(&status, repo, name, GIT_SUBMODULE_IGNORE_FALLBACK));
return status;
}
diff --git a/tests/submodule/update.c b/tests/submodule/update.c
index 8587043..fed6d38 100644
--- a/tests/submodule/update.c
+++ b/tests/submodule/update.c
@@ -103,7 +103,7 @@ void test_submodule_update__update_submodule(void)
cl_git_pass(git_submodule_lookup(&sm, g_repo, "testrepo"));
/* verify the initial state of the submodule */
- cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo"));
+ cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo", GIT_SUBMODULE_IGNORE_FALLBACK));
cl_assert_equal_i(submodule_status, GIT_SUBMODULE_STATUS_IN_HEAD |
GIT_SUBMODULE_STATUS_IN_INDEX |
GIT_SUBMODULE_STATUS_IN_CONFIG |
@@ -114,7 +114,7 @@ void test_submodule_update__update_submodule(void)
cl_git_pass(git_submodule_update(sm, 0, &update_options));
/* verify state */
- cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo"));
+ cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo", GIT_SUBMODULE_IGNORE_FALLBACK));
cl_assert_equal_i(submodule_status, GIT_SUBMODULE_STATUS_IN_HEAD |
GIT_SUBMODULE_STATUS_IN_INDEX |
GIT_SUBMODULE_STATUS_IN_CONFIG |
@@ -142,7 +142,7 @@ void test_submodule_update__update_and_init_submodule(void)
/* get the submodule */
cl_git_pass(git_submodule_lookup(&sm, g_repo, "testrepo"));
- cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo"));
+ cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo", GIT_SUBMODULE_IGNORE_FALLBACK));
cl_assert_equal_i(submodule_status, GIT_SUBMODULE_STATUS_IN_HEAD |
GIT_SUBMODULE_STATUS_IN_INDEX |
GIT_SUBMODULE_STATUS_IN_CONFIG |
@@ -177,7 +177,7 @@ void test_submodule_update__update_already_checked_out_submodule(void)
/* Initialize and update the sub repository */
cl_git_pass(git_submodule_lookup(&sm, g_repo, "testrepo"));
- cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo"));
+ cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo", GIT_SUBMODULE_IGNORE_FALLBACK));
cl_assert_equal_i(submodule_status, GIT_SUBMODULE_STATUS_IN_HEAD |
GIT_SUBMODULE_STATUS_IN_INDEX |
GIT_SUBMODULE_STATUS_IN_CONFIG |
@@ -203,7 +203,7 @@ void test_submodule_update__update_already_checked_out_submodule(void)
* HEAD commit and index should be updated, but not the workdir.
*/
- cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo"));
+ cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo", GIT_SUBMODULE_IGNORE_FALLBACK));
git_submodule_free(sm);
cl_git_pass(git_submodule_lookup(&sm, g_repo, "testrepo"));
@@ -255,7 +255,7 @@ void test_submodule_update__update_blocks_on_dirty_wd(void)
/* Initialize and update the sub repository */
cl_git_pass(git_submodule_lookup(&sm, g_repo, "testrepo"));
- cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo"));
+ cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo", GIT_SUBMODULE_IGNORE_FALLBACK));
cl_assert_equal_i(submodule_status, GIT_SUBMODULE_STATUS_IN_HEAD |
GIT_SUBMODULE_STATUS_IN_INDEX |
GIT_SUBMODULE_STATUS_IN_CONFIG |
@@ -281,7 +281,7 @@ void test_submodule_update__update_blocks_on_dirty_wd(void)
* HEAD commit and index should be updated, but not the workdir.
*/
- cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo"));
+ cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo", GIT_SUBMODULE_IGNORE_FALLBACK));
git_submodule_free(sm);
cl_git_pass(git_submodule_lookup(&sm, g_repo, "testrepo"));
@@ -332,7 +332,7 @@ void test_submodule_update__can_force_update(void)
/* Initialize and update the sub repository */
cl_git_pass(git_submodule_lookup(&sm, g_repo, "testrepo"));
- cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo"));
+ cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo", GIT_SUBMODULE_IGNORE_FALLBACK));
cl_assert_equal_i(submodule_status, GIT_SUBMODULE_STATUS_IN_HEAD |
GIT_SUBMODULE_STATUS_IN_INDEX |
GIT_SUBMODULE_STATUS_IN_CONFIG |
@@ -357,7 +357,7 @@ void test_submodule_update__can_force_update(void)
* Verify state after checkout of parent repository. The submodule ID in the
* HEAD commit and index should be updated, but not the workdir.
*/
- cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo"));
+ cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo", GIT_SUBMODULE_IGNORE_FALLBACK));
git_submodule_free(sm);
cl_git_pass(git_submodule_lookup(&sm, g_repo, "testrepo"));