summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Tan <jonathantanmy@google.com>2021-09-21 16:51:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-09-23 00:15:12 (GMT)
commita6549369262850f555aeaaffa65682ece3ac6e43 (patch)
tree0c0de7f5cefc894f940cdfc88735b00bc41d5a3d
parent1868ae979a2009470007ef8eb99e2e8342d7e89f (diff)
downloadgit-a6549369262850f555aeaaffa65682ece3ac6e43.zip
git-a6549369262850f555aeaaffa65682ece3ac6e43.tar.gz
git-a6549369262850f555aeaaffa65682ece3ac6e43.tar.bz2
submodule: trace adding submodule ODB as alternate
Submodule ODBs are never added as alternates during the execution of the test suite, but there may be a rare interaction that the test suite does not have coverage of. Add a trace message when this happens, so that users who trace their commands can notice such occurrences. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--submodule.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/submodule.c b/submodule.c
index d38885b..5a7e6f5 100644
--- a/submodule.c
+++ b/submodule.c
@@ -207,6 +207,8 @@ int register_all_submodule_odb_as_alternates(void)
add_to_alternates_memory(added_submodule_odb_paths.items[i].string);
if (ret) {
string_list_clear(&added_submodule_odb_paths, 0);
+ trace2_data_intmax("submodule", the_repository,
+ "register_all_submodule_odb_as_alternates/registered", ret);
if (git_env_bool("GIT_TEST_FATAL_REGISTER_SUBMODULE_ODB", 0))
BUG("register_all_submodule_odb_as_alternates() called");
}