Merge branch 'cr/git-work-tree-sans-git-dir'
[gitweb.git] / t / t2200-add-update.sh
index 32f932a4cef9e1c80f52def592a4e26d8877680a..b2bd41918ee7f8b19e3ef906f27796f331ed9ea5 100755 (executable)
@@ -80,6 +80,22 @@ test_expect_success 'change gets noticed' '
 
 '
 
+# Note that this is scheduled to change in Git 2.0, when
+# "git add -u" will become full-tree by default.
+test_expect_success 'non-limited update in subdir leaves root alone' '
+       (
+               cd dir1 &&
+               echo even more >>sub2 &&
+               git add -u
+       ) &&
+       cat >expect <<-\EOF &&
+       check
+       top
+       EOF
+       git diff-files --name-only >actual &&
+       test_cmp expect actual
+'
+
 test_expect_success SYMLINKS 'replace a file with a symlink' '
 
        rm foo &&