@@ -291,6 +291,18 @@ test_expect_success 'add, commit, checkout' '
test_all_match git checkout -
'
+# NEEDSWORK: This documents current behavior, but is not a desirable
+# behavior (untracked files are handled differently than tracked).
+test_expect_success 'add outside sparse cone' '
+ init_repos &&
+
+ run_on_sparse mkdir folder1 &&
+ run_on_sparse ../edit-contents folder1/a &&
+ run_on_sparse ../edit-contents folder1/newfile &&
+ test_sparse_match test_must_fail git add folder1/a &&
+ test_sparse_match git add folder1/newfile
+'
+
test_expect_success 'commit including unstaged changes' '
init_repos &&