summaryrefslogtreecommitdiff
path: root/t/t7413-submodule-is-active.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t7413-submodule-is-active.sh')
-rwxr-xr-xt/t7413-submodule-is-active.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t7413-submodule-is-active.sh b/t/t7413-submodule-is-active.sh
index 9509dc18fd..6fd3b870de 100755
--- a/t/t7413-submodule-is-active.sh
+++ b/t/t7413-submodule-is-active.sh
@@ -124,4 +124,19 @@ test_expect_success 'is-active, submodule.active and submodule add' '
git -C super2 config --get submodule.mod.active
'
+test_expect_success 'submodule add skips redundant active entry' '
+ git init repo &&
+ (
+ cd repo &&
+ git config submodule.active "lib/*" &&
+ git commit --allow-empty -m init &&
+
+ git init ../lib-origin &&
+ git -C ../lib-origin commit --allow-empty -m init &&
+
+ git submodule add ../lib-origin lib/foo &&
+ test_must_fail git config --get submodule.lib/foo.active
+ )
+'
+
test_done