summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-03-19 12:21:27 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-03-19 12:21:27 -0700
commit4d5dcd976d533779a968fee0350c70f4e05ae5a5 (patch)
treeb9674378adde678ce8aebffa9060f50646081445 /t
parentMerge branch 'lf/bundle-verify-list-prereqs' (diff)
parentt2200: check that "add -u" limits itself to subdirectory (diff)
downloadtgif-4d5dcd976d533779a968fee0350c70f4e05ae5a5.tar.xz
Merge branch 'jc/add-2.0-u-A-sans-pathspec' (early part)
* 'jc/add-2.0-u-A-sans-pathspec' (early part): t2200: check that "add -u" limits itself to subdirectory
Diffstat (limited to 't')
-rwxr-xr-xt/t2200-add-update.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh
index 4cdebda6a5..c317254b9a 100755
--- a/t/t2200-add-update.sh
+++ b/t/t2200-add-update.sh
@@ -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 &&