提交 7bf7a92f 编写于 作者: J Jeff King 提交者: Junio C Hamano

t2200: check that "add -u" limits itself to subdirectory

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: NJeff King <peff@peff.net>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 c75aa630
......@@ -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 &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册