sha1_file: restore OBJECT_INFO_QUICK functionality
[gitweb.git] / t / t1007-hash-object.sh
index c5245c5cb4c1c086b6fe7205f34b9b5ca53e2e59..532682f51c4f9cefc34a44cf7e7f4231c60b7f65 100755 (executable)
@@ -134,6 +134,16 @@ test_expect_success 'gitattributes also work in a subdirectory' '
        )
 '
 
+test_expect_success '--path works in a subdirectory' '
+       (
+               cd subdir &&
+               path1_sha=$(git hash-object --path=../file1 ../file0) &&
+               path0_sha=$(git hash-object --path=../file0 ../file1) &&
+               test "$file0_sha" = "$path0_sha" &&
+               test "$file1_sha" = "$path1_sha"
+       )
+'
+
 test_expect_success 'check that --no-filters option works' '
        nofilters_file1=$(git hash-object --no-filters file1) &&
        test "$file0_sha" = "$nofilters_file1" &&