diff options
-rw-r--r-- | submodule-config.h | 1 | ||||
-rw-r--r-- | t/helper/test-submodule-config.c | 6 | ||||
-rwxr-xr-x | t/t7411-submodule-config.sh | 72 |
3 files changed, 0 insertions, 79 deletions
diff --git a/submodule-config.h b/submodule-config.h index cccd34b929..84c2cf5152 100644 --- a/submodule-config.h +++ b/submodule-config.h @@ -34,7 +34,6 @@ extern int option_fetch_parse_recurse_submodules(const struct option *opt, const char *arg, int unset); extern int parse_update_recurse_submodules_arg(const char *opt, const char *arg); extern int parse_push_recurse_submodules_arg(const char *opt, const char *arg); -extern int parse_submodule_config_option(const char *var, const char *value); extern int submodule_config_option(struct repository *repo, const char *var, const char *value); extern const struct submodule *submodule_from_name( diff --git a/t/helper/test-submodule-config.c b/t/helper/test-submodule-config.c index e13fbcc1b5..f4a7c431c0 100644 --- a/t/helper/test-submodule-config.c +++ b/t/helper/test-submodule-config.c @@ -10,11 +10,6 @@ static void die_usage(int argc, const char **argv, const char *msg) exit(1); } -static int git_test_config(const char *var, const char *value, void *cb) -{ - return parse_submodule_config_option(var, value); -} - int cmd_main(int argc, const char **argv) { const char **arg = argv; @@ -38,7 +33,6 @@ int cmd_main(int argc, const char **argv) setup_git_directory(); gitmodules_config(); - git_config(git_test_config, NULL); while (*arg) { struct object_id commit_oid; diff --git a/t/t7411-submodule-config.sh b/t/t7411-submodule-config.sh index 7d6b25ba23..46c09c7765 100755 --- a/t/t7411-submodule-config.sh +++ b/t/t7411-submodule-config.sh @@ -122,78 +122,6 @@ test_expect_success 'using different treeishs works' ' ) ' -cat >super/expect_url <<EOF -Submodule url: 'git@somewhere.else.net:a.git' for path 'b' -Submodule url: 'git@somewhere.else.net:submodule.git' for path 'submodule' -EOF - -cat >super/expect_local_path <<EOF -Submodule name: 'a' for path 'c' -Submodule name: 'submodule' for path 'submodule' -EOF - -test_expect_success 'reading of local configuration' ' - (cd super && - old_a=$(git config submodule.a.url) && - old_submodule=$(git config submodule.submodule.url) && - git config submodule.a.url git@somewhere.else.net:a.git && - git config submodule.submodule.url git@somewhere.else.net:submodule.git && - test-submodule-config --url \ - "" b \ - "" submodule \ - >actual && - test_cmp expect_url actual && - git config submodule.a.path c && - test-submodule-config \ - "" c \ - "" submodule \ - >actual && - test_cmp expect_local_path actual && - git config submodule.a.url "$old_a" && - git config submodule.submodule.url "$old_submodule" && - git config --unset submodule.a.path c - ) -' - -cat >super/expect_url <<EOF -Submodule url: '../submodule' for path 'b' -Submodule url: 'git@somewhere.else.net:submodule.git' for path 'submodule' -EOF - -test_expect_success 'reading of local configuration for uninitialized submodules' ' - ( - cd super && - git submodule deinit -f b && - old_submodule=$(git config submodule.submodule.url) && - git config submodule.submodule.url git@somewhere.else.net:submodule.git && - test-submodule-config --url \ - "" b \ - "" submodule \ - >actual && - test_cmp expect_url actual && - git config submodule.submodule.url "$old_submodule" && - git submodule init b - ) -' - -cat >super/expect_fetchrecurse_die.err <<EOF -fatal: bad submodule.submodule.fetchrecursesubmodules argument: blabla -EOF - -test_expect_success 'local error in fetchrecursesubmodule dies early' ' - (cd super && - git config submodule.submodule.fetchrecursesubmodules blabla && - test_must_fail test-submodule-config \ - "" b \ - "" submodule \ - >actual.out 2>actual.err && - touch expect_fetchrecurse_die.out && - test_cmp expect_fetchrecurse_die.out actual.out && - test_cmp expect_fetchrecurse_die.err actual.err && - git config --unset submodule.submodule.fetchrecursesubmodules - ) -' - test_expect_success 'error in history in fetchrecursesubmodule lets continue' ' (cd super && git config -f .gitmodules \ |