summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rwxr-xr-xt/t1007-hash-object.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t1007-hash-object.sh b/t/t1007-hash-object.sh
index 7d2baa15bb..285871c24d 100755
--- a/t/t1007-hash-object.sh
+++ b/t/t1007-hash-object.sh
@@ -121,6 +121,17 @@ test_expect_success 'check that appropriate filter is invoke when --path is used
git config --unset core.autocrlf
'
+test_expect_success 'gitattributes also work in a subdirectory' '
+ mkdir subdir &&
+ (
+ cd subdir &&
+ subdir_sha0=$(git hash-object ../file0) &&
+ subdir_sha1=$(git hash-object ../file1) &&
+ test "$file0_sha" = "$subdir_sha0" &&
+ test "$file1_sha" = "$subdir_sha1"
+ )
+'
+
test_expect_success 'check that --no-filters option works' '
echo fooQ | tr Q "\\015" >file0 &&
cp file0 file1 &&