hash-object: always try to set up the git repository
[gitweb.git] / t / t1007-hash-object.sh
index 7d2baa15bbd0bbbe8c12631ad2d24b77e90b8775..285871c24d88c4667d547e957da682fd78bf6ab9 100755 (executable)
@@ -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 &&