3 # Copyright (c) 2017 Intel Corporation
6 test_description
='Refresh with submodules'
10 test_expect_success
'refresh with a submodule does not include by default' '
11 test_create_repo foo &&
12 git submodule add ./foo foo &&
13 git commit -m "submodule" &&
19 git commit -m "change in submodule"
23 [ "$(stg status)" = " M foo" ]
26 test_expect_success
'refresh includes non-submodule changes' '
30 [ "$(stg status)" = " M foo" ]
33 test_expect_success
'refresh with --submodules' '
34 stg refresh --submodules &&
35 [ "$(stg status)" = "" ]
38 test_expect_success
'refresh --no-submodules overrides config' '
39 stg undo && stg undo &&
40 git config stgit.refreshsubmodules yes &&
41 stg refresh --no-submodules &&
42 [ "$(stg status)" = " M foo" ]
45 test_expect_success
'refresh with config' '
47 [ "$(stg status)" = "" ]