diff options
Diffstat (limited to 't/t7506-status-submodule.sh')
-rwxr-xr-x | t/t7506-status-submodule.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t7506-status-submodule.sh b/t/t7506-status-submodule.sh index aeec1f6142..3d4f85d74f 100755 --- a/t/t7506-status-submodule.sh +++ b/t/t7506-status-submodule.sh @@ -157,6 +157,22 @@ test_expect_success 'status with added and untracked file in modified submodule EOF ' +test_expect_success 'setup .git file for sub' ' + (cd sub && + rm -f new-file + REAL="$(pwd)/../.real" && + mv .git "$REAL" + echo "gitdir: $REAL" >.git) && + echo .real >>.gitignore && + git commit -m "added .real to .gitignore" .gitignore +' + +test_expect_success 'status with added file in modified submodule with .git file' ' + (cd sub && git reset --hard && echo >foo && git add foo) && + git status >output && + grep "modified: sub (new commits, modified content)" output +' + test_expect_success 'rm submodule contents' ' rm -rf sub/* sub/.git ' |