Thread (10 messages) flat view 10 messages, 3 authors, 2016-06-15
STALE3732d

[PATCH 1/2] t2200: check that "add -u" limits itself to subdirectory

From: Jeff King <hidden>
Date: 2016-06-15 22:56:22
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

This behavior is due to change in the future, but let's test
it anyway. That helps make sure we do not accidentally
switch the behavior too soon while we are working in the
area, and it means that we can easily verify the change when
we do make it.

Signed-off-by: Jeff King <redacted>
---
We didn't seem to be testing this transition at all. I think it's sane
to do so now, and Junio's "now it is 2.0, let's switch" patch should
update the test.

 t/t2200-add-update.sh | 11 +++++++++++
 1 file changed, 11 insertions(+)
diff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh
index 4cdebda..fe4f548 100755
--- a/t/t2200-add-update.sh
+++ b/t/t2200-add-update.sh
@@ -80,6 +80,17 @@ 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 'update did not touch files at root' '
+	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 &&
-- 
1.8.2.rc2.7.gef06216
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help