@@ -212,7 +212,7 @@ test_expect_success 'email without @ is okay' '
212212test_expect_success ' email with embedded > is not okay' '
213213 git cat-file commit HEAD >basis &&
214214 sed "s/@[a-z]/&>/" basis >bad-email &&
215- new=$(git hash-object -t commit -w --stdin <bad-email) &&
215+ new=$(git hash-object --literally - t commit -w --stdin <bad-email) &&
216216 test_when_finished "remove_object $new" &&
217217 git update-ref refs/heads/bogus "$new" &&
218218 test_when_finished "git update-ref -d refs/heads/bogus" &&
@@ -223,7 +223,7 @@ test_expect_success 'email with embedded > is not okay' '
223223test_expect_success ' missing < email delimiter is reported nicely' '
224224 git cat-file commit HEAD >basis &&
225225 sed "s/<//" basis >bad-email-2 &&
226- new=$(git hash-object -t commit -w --stdin <bad-email-2) &&
226+ new=$(git hash-object --literally - t commit -w --stdin <bad-email-2) &&
227227 test_when_finished "remove_object $new" &&
228228 git update-ref refs/heads/bogus "$new" &&
229229 test_when_finished "git update-ref -d refs/heads/bogus" &&
@@ -234,7 +234,7 @@ test_expect_success 'missing < email delimiter is reported nicely' '
234234test_expect_success ' missing email is reported nicely' '
235235 git cat-file commit HEAD >basis &&
236236 sed "s/[a-z]* <[^>]*>//" basis >bad-email-3 &&
237- new=$(git hash-object -t commit -w --stdin <bad-email-3) &&
237+ new=$(git hash-object --literally - t commit -w --stdin <bad-email-3) &&
238238 test_when_finished "remove_object $new" &&
239239 git update-ref refs/heads/bogus "$new" &&
240240 test_when_finished "git update-ref -d refs/heads/bogus" &&
@@ -245,7 +245,7 @@ test_expect_success 'missing email is reported nicely' '
245245test_expect_success ' > in name is reported' '
246246 git cat-file commit HEAD >basis &&
247247 sed "s/ </> </" basis >bad-email-4 &&
248- new=$(git hash-object -t commit -w --stdin <bad-email-4) &&
248+ new=$(git hash-object --literally - t commit -w --stdin <bad-email-4) &&
249249 test_when_finished "remove_object $new" &&
250250 git update-ref refs/heads/bogus "$new" &&
251251 test_when_finished "git update-ref -d refs/heads/bogus" &&
@@ -258,7 +258,7 @@ test_expect_success 'integer overflow in timestamps is reported' '
258258 git cat-file commit HEAD >basis &&
259259 sed "s/^\\(author .*>\\) [0-9]*/\\1 18446744073709551617/" \
260260 <basis >bad-timestamp &&
261- new=$(git hash-object -t commit -w --stdin <bad-timestamp) &&
261+ new=$(git hash-object --literally - t commit -w --stdin <bad-timestamp) &&
262262 test_when_finished "remove_object $new" &&
263263 git update-ref refs/heads/bogus "$new" &&
264264 test_when_finished "git update-ref -d refs/heads/bogus" &&
@@ -269,7 +269,7 @@ test_expect_success 'integer overflow in timestamps is reported' '
269269test_expect_success ' commit with NUL in header' '
270270 git cat-file commit HEAD >basis &&
271271 sed "s/author ./author Q/" <basis | q_to_nul >commit-NUL-header &&
272- new=$(git hash-object -t commit -w --stdin <commit-NUL-header) &&
272+ new=$(git hash-object --literally - t commit -w --stdin <commit-NUL-header) &&
273273 test_when_finished "remove_object $new" &&
274274 git update-ref refs/heads/bogus "$new" &&
275275 test_when_finished "git update-ref -d refs/heads/bogus" &&
@@ -292,7 +292,7 @@ test_expect_success 'tree object with duplicate entries' '
292292 git cat-file tree $T &&
293293 git cat-file tree $T
294294 ) |
295- git hash-object -w -t tree --stdin
295+ git hash-object --literally - w -t tree --stdin
296296 ) &&
297297 test_must_fail git fsck 2>out &&
298298 test_i18ngrep "error in tree .*contains duplicate file entries" out
@@ -426,7 +426,7 @@ test_expect_success 'tag with incorrect tag name & missing tagger' '
426426 This is an invalid tag.
427427 EOF
428428
429- tag=$(git hash-object -t tag -w --stdin <wrong-tag) &&
429+ tag=$(git hash-object --literally - t tag -w --stdin <wrong-tag) &&
430430 test_when_finished "remove_object $tag" &&
431431 echo $tag >.git/refs/tags/wrong &&
432432 test_when_finished "git update-ref -d refs/tags/wrong" &&
@@ -558,7 +558,7 @@ test_expect_success 'rev-list --verify-objects with commit graph (parent)' '
558558test_expect_success ' force fsck to ignore double author' '
559559 git cat-file commit HEAD >basis &&
560560 sed "s/^author .*/&,&/" <basis | tr , \\n >multiple-authors &&
561- new=$(git hash-object -t commit -w --stdin <multiple-authors) &&
561+ new=$(git hash-object --literally - t commit -w --stdin <multiple-authors) &&
562562 test_when_finished "remove_object $new" &&
563563 git update-ref refs/heads/bogus "$new" &&
564564 test_when_finished "git update-ref -d refs/heads/bogus" &&
@@ -573,7 +573,7 @@ test_expect_success 'fsck notices blob entry pointing to null sha1' '
573573 (git init null-blob &&
574574 cd null-blob &&
575575 sha=$(printf "100644 file$_bz$_bzoid" |
576- git hash-object -w --stdin -t tree) &&
576+ git hash-object --literally - w --stdin -t tree) &&
577577 git fsck 2>out &&
578578 test_i18ngrep "warning.*null sha1" out
579579 )
@@ -583,7 +583,7 @@ test_expect_success 'fsck notices submodule entry pointing to null sha1' '
583583 (git init null-commit &&
584584 cd null-commit &&
585585 sha=$(printf "160000 submodule$_bz$_bzoid" |
586- git hash-object -w --stdin -t tree) &&
586+ git hash-object --literally - w --stdin -t tree) &&
587587 git fsck 2>out &&
588588 test_i18ngrep "warning.*null sha1" out
589589 )
@@ -648,7 +648,7 @@ test_expect_success 'NUL in commit' '
648648 git commit --allow-empty -m "initial commitQNUL after message" &&
649649 git cat-file commit HEAD >original &&
650650 q_to_nul <original >munged &&
651- git hash-object -w -t commit --stdin <munged >name &&
651+ git hash-object --literally - w -t commit --stdin <munged >name &&
652652 git branch bad $(cat name) &&
653653
654654 test_must_fail git -c fsck.nulInCommit=error fsck 2>warn.1 &&
@@ -794,8 +794,8 @@ test_expect_success 'fsck errors in packed objects' '
794794 git cat-file commit HEAD >basis &&
795795 sed "s/</one/" basis >one &&
796796 sed "s/</foo/" basis >two &&
797- one=$(git hash-object -t commit -w one) &&
798- two=$(git hash-object -t commit -w two) &&
797+ one=$(git hash-object --literally - t commit -w one) &&
798+ two=$(git hash-object --literally - t commit -w two) &&
799799 pack=$(
800800 {
801801 echo $one &&
0 commit comments