Code

Merge branch 'maint-1.6.0' into maint
[git.git] / t / t3001-ls-files-others-exclude.sh
index 55f057cebeb37a8ba8cd9c1e6aa5101c66988bcb..85aef12a113fed8164a085a19ce5c794ab96ff6f 100755 (executable)
@@ -65,7 +65,7 @@ test_expect_success \
        --exclude-per-directory=.gitignore \
        --exclude-from=.git/ignore \
        >output &&
-     git diff expect output'
+     test_cmp expect output'
 
 # Test \r\n (MSDOS-like systems)
 printf '*.1\r\n/*.3\r\n!*.6\r\n' >.gitignore
@@ -77,7 +77,7 @@ test_expect_success \
        --exclude-per-directory=.gitignore \
        --exclude-from=.git/ignore \
        >output &&
-     git diff expect output'
+     test_cmp expect output'
 
 cat > excludes-file << EOF
 *.[1-8]
@@ -96,7 +96,7 @@ cat > expect << EOF
 #      three/
 EOF
 
-test_expect_success 'git-status honours core.excludesfile' \
+test_expect_success 'git status honors core.excludesfile' \
        'test_cmp expect output'
 
 test_expect_success 'trailing slash in exclude allows directory match(1)' '
@@ -140,4 +140,10 @@ test_expect_success 'trailing slash in exclude forces directory match (2)' '
 
 '
 
+test_expect_success 'negated exclude matches can override previous ones' '
+
+       git ls-files --others --exclude="a.*" --exclude="!a.1" >output &&
+       grep "^a.1" output
+'
+
 test_done