]> git.ipfire.org Git - thirdparty/git.git/blame - t/t7413-submodule-is-active.sh
submodule--helper clone: check for configured submodules using helper
[thirdparty/git.git] / t / t7413-submodule-is-active.sh
CommitLineData
5c2bd8b7
BW
1#!/bin/sh
2
3test_description='Test submodule--helper is-active
4
5This test verifies that `git submodue--helper is-active` correclty identifies
6submodules which are "active" and interesting to the user.
7'
8
9. ./test-lib.sh
10
11test_expect_success 'setup' '
12 git init sub &&
13 test_commit -C sub initial &&
14 git init super &&
15 test_commit -C super initial &&
16 git -C super submodule add ../sub sub1 &&
17 git -C super submodule add ../sub sub2 &&
18 git -C super commit -a -m "add 2 submodules at sub{1,2}"
19'
20
21test_expect_success 'is-active works with urls' '
22 git -C super submodule--helper is-active sub1 &&
23 git -C super submodule--helper is-active sub2 &&
24
25 git -C super config --unset submodule.sub1.URL &&
26 test_must_fail git -C super submodule--helper is-active sub1 &&
27 git -C super config submodule.sub1.URL ../sub &&
28 git -C super submodule--helper is-active sub1
29'
30
31test_done