Merge branch 'fc/t3200-fixes'
[gitweb.git] / t / t1006-cat-file.sh
index d499d02a29f3ec5fb15d86835d24ccabd322df56..a420742494024e127d4e4233153c7054e077e471 100755 (executable)
@@ -98,6 +98,14 @@ test_expect_success "setup" '
 
 run_tests 'blob' $hello_sha1 $hello_size "$hello_content" "$hello_content"
 
+test_expect_success '--batch-check without %(rest) considers whole line' '
+       echo "$hello_sha1 blob $hello_size" >expect &&
+       git update-index --add --cacheinfo 100644 $hello_sha1 "white space" &&
+       test_when_finished "git update-index --remove \"white space\"" &&
+       echo ":white space" | git cat-file --batch-check >actual &&
+       test_cmp expect actual
+'
+
 tree_sha1=$(git write-tree)
 tree_size=33
 tree_pretty_content="100644 blob $hello_sha1   hello"