Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/helper/test-submodule-nested-repo-config.c # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / helper / test-submodule-nested-repo-config.c` 34 lines ยท 813 bytes Raw Blame History 1 #define USE_THE_REPOSITORY_VARIABLE 2 3 #include "test-tool.h" 4 #include "repository.h" 5 #include "setup.h" 6 #include "submodule-config.h" 7 8 static void die_usage(const char **argv, const char *msg) 9 { 10 fprintf(stderr, "%s\n", msg); 11 fprintf(stderr, "Usage: %s \n", argv[0]); 12 exit(1); 13 } 14 15 int cmd__submodule_nested_repo_config(int argc, const char **argv) 16 { 17 struct repository subrepo; 18 19 if (argc < 3) 20 die_usage(argv, "Wrong number of arguments."); 21 22 setup_git_directory(the_repository); 23 24 if (repo_submodule_init(&subrepo, the_repository, argv[1], null_oid(the_hash_algo))) { 25 die_usage(argv, "Submodule not found."); 26 } 27 28 /* Read the config of _child_ submodules. */ 29 print_config_from_gitmodules(&subrepo, argv[2]); 30 31 submodule_free(the_repository); 32 repo_clear(&subrepo); 33 return 0; 34 }