summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-05-08 06:59:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-08 06:59:17 (GMT)
commit0c7ecb7c311d393db41f4d81a113ffc5f3b4498f (patch)
tree1b96e0dd82a0396aa205637d120ab1caac74fbe3 /t
parent92034a9cd5e71cf686ef66029433bdaba75027b0 (diff)
parentda62f786d2df60f3c8255cf4cbbcd9c1f9458d99 (diff)
downloadgit-0c7ecb7c311d393db41f4d81a113ffc5f3b4498f.zip
git-0c7ecb7c311d393db41f4d81a113ffc5f3b4498f.tar.gz
git-0c7ecb7c311d393db41f4d81a113ffc5f3b4498f.tar.bz2
Merge branch 'sb/submodule-move-nested'
Moving a submodule that itself has submodule in it with "git mv" forgot to make necessary adjustment to the nested sub-submodules; now the codepath learned to recurse into the submodules. * sb/submodule-move-nested: submodule: fixup nested submodules after moving the submodule submodule-config: remove submodule_from_cache submodule-config: add repository argument to submodule_from_{name, path} submodule-config: allow submodule_free to handle arbitrary repositories grep: remove "repo" arg from non-supporting funcs submodule.h: drop declaration of connect_work_tree_and_git_dir
Diffstat (limited to 't')
-rw-r--r--t/helper/test-submodule-config.c8
-rwxr-xr-xt/t7001-mv.sh2
2 files changed, 6 insertions, 4 deletions
diff --git a/t/helper/test-submodule-config.c b/t/helper/test-submodule-config.c
index 5c6e4b0..e269274 100644
--- a/t/helper/test-submodule-config.c
+++ b/t/helper/test-submodule-config.c
@@ -49,9 +49,11 @@ int cmd__submodule_config(int argc, const char **argv)
die_usage(argc, argv, "Commit not found.");
if (lookup_name) {
- submodule = submodule_from_name(&commit_oid, path_or_name);
+ submodule = submodule_from_name(the_repository,
+ &commit_oid, path_or_name);
} else
- submodule = submodule_from_path(&commit_oid, path_or_name);
+ submodule = submodule_from_path(the_repository,
+ &commit_oid, path_or_name);
if (!submodule)
die_usage(argc, argv, "Submodule not found.");
@@ -65,7 +67,7 @@ int cmd__submodule_config(int argc, const char **argv)
arg += 2;
}
- submodule_free();
+ submodule_free(the_repository);
return 0;
}
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index e96cbdb..cc3fd2b 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -495,7 +495,7 @@ test_expect_success 'moving a submodule in nested directories' '
test_cmp expect actual
'
-test_expect_failure 'moving nested submodules' '
+test_expect_success 'moving nested submodules' '
git commit -am "cleanup commit" &&
mkdir sub_nested_nested &&
(cd sub_nested_nested &&