Merge branch 'cc/trailers-corner-case-fix'
[gitweb.git] / t / t7063-status-untracked-cache.sh
index 22393b9511c65feb06798f41bae832a124e0cd57..37a24c131240c46d0694e0a148ec7c15b89e17fe 100755 (executable)
@@ -375,7 +375,7 @@ EOF
 node creation: 0
 gitignore invalidation: 0
 directory invalidation: 0
-opendir: 1
+opendir: 2
 EOF
        test_cmp ../trace.expect ../trace
 '
@@ -543,4 +543,30 @@ EOF
        test_cmp ../trace.expect ../trace
 '
 
+test_expect_success 'move entry in subdir from untracked to cached' '
+       git add dtwo/two &&
+       git status --porcelain >../status.actual &&
+       cat >../status.expect <<EOF &&
+ M done/two
+A  dtwo/two
+?? .gitignore
+?? done/five
+?? done/sub/
+EOF
+       test_cmp ../status.expect ../status.actual
+'
+
+test_expect_success 'move entry in subdir from cached to untracked' '
+       git rm --cached dtwo/two &&
+       git status --porcelain >../status.actual &&
+       cat >../status.expect <<EOF &&
+ M done/two
+?? .gitignore
+?? done/five
+?? done/sub/
+?? dtwo/
+EOF
+       test_cmp ../status.expect ../status.actual
+'
+
 test_done