http: extract type/subtype portion of content-type
[gitweb.git] / t / t2200-add-update.sh
index 4cdebda6a5c9b893f46e99b5b565cc4b70efb2db..e16b15d3e5784eb3c6423318142cb91fe3a58601 100755 (executable)
@@ -80,11 +80,21 @@ test_expect_success 'change gets noticed' '
 
 '
 
-test_expect_success SYMLINKS 'replace a file with a symlink' '
+test_expect_success 'non-qualified update in subdir updates from the root' '
+       (
+               cd dir1 &&
+               echo even more >>sub2 &&
+               git add -u
+       ) &&
+       : >expect &&
+       git diff-files --name-only >actual &&
+       test_cmp expect actual
+'
+
+test_expect_success 'replace a file with a symlink' '
 
        rm foo &&
-       ln -s top foo &&
-       git add -u -- foo
+       test_ln_s_add top foo
 
 '
 
@@ -150,9 +160,9 @@ test_expect_success 'add -u resolves unmerged paths' '
        echo 2 >path3 &&
        echo 2 >path5 &&
 
-       # Explicit resolving by adding removed paths should fail
-       test_must_fail git add path4 &&
-       test_must_fail git add path6 &&
+       # Fail to explicitly resolve removed paths with "git add"
+       test_must_fail git add --no-all path4 &&
+       test_must_fail git add --no-all path6 &&
 
        # "add -u" should notice removals no matter what stages
        # the index entries are in.