@@ -212,7 +212,7 @@ test_expect_success 'email without @ is okay' '
212
212
test_expect_success ' email with embedded > is not okay' '
213
213
git cat-file commit HEAD >basis &&
214
214
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) &&
216
216
test_when_finished "remove_object $new" &&
217
217
git update-ref refs/heads/bogus "$new" &&
218
218
test_when_finished "git update-ref -d refs/heads/bogus" &&
@@ -223,7 +223,7 @@ test_expect_success 'email with embedded > is not okay' '
223
223
test_expect_success ' missing < email delimiter is reported nicely' '
224
224
git cat-file commit HEAD >basis &&
225
225
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) &&
227
227
test_when_finished "remove_object $new" &&
228
228
git update-ref refs/heads/bogus "$new" &&
229
229
test_when_finished "git update-ref -d refs/heads/bogus" &&
@@ -234,7 +234,7 @@ test_expect_success 'missing < email delimiter is reported nicely' '
234
234
test_expect_success ' missing email is reported nicely' '
235
235
git cat-file commit HEAD >basis &&
236
236
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) &&
238
238
test_when_finished "remove_object $new" &&
239
239
git update-ref refs/heads/bogus "$new" &&
240
240
test_when_finished "git update-ref -d refs/heads/bogus" &&
@@ -245,7 +245,7 @@ test_expect_success 'missing email is reported nicely' '
245
245
test_expect_success ' > in name is reported' '
246
246
git cat-file commit HEAD >basis &&
247
247
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) &&
249
249
test_when_finished "remove_object $new" &&
250
250
git update-ref refs/heads/bogus "$new" &&
251
251
test_when_finished "git update-ref -d refs/heads/bogus" &&
@@ -258,7 +258,7 @@ test_expect_success 'integer overflow in timestamps is reported' '
258
258
git cat-file commit HEAD >basis &&
259
259
sed "s/^\\(author .*>\\) [0-9]*/\\1 18446744073709551617/" \
260
260
<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) &&
262
262
test_when_finished "remove_object $new" &&
263
263
git update-ref refs/heads/bogus "$new" &&
264
264
test_when_finished "git update-ref -d refs/heads/bogus" &&
@@ -269,7 +269,7 @@ test_expect_success 'integer overflow in timestamps is reported' '
269
269
test_expect_success ' commit with NUL in header' '
270
270
git cat-file commit HEAD >basis &&
271
271
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) &&
273
273
test_when_finished "remove_object $new" &&
274
274
git update-ref refs/heads/bogus "$new" &&
275
275
test_when_finished "git update-ref -d refs/heads/bogus" &&
@@ -292,7 +292,7 @@ test_expect_success 'tree object with duplicate entries' '
292
292
git cat-file tree $T &&
293
293
git cat-file tree $T
294
294
) |
295
- git hash-object -w -t tree --stdin
295
+ git hash-object --literally - w -t tree --stdin
296
296
) &&
297
297
test_must_fail git fsck 2>out &&
298
298
test_i18ngrep "error in tree .*contains duplicate file entries" out
@@ -426,7 +426,7 @@ test_expect_success 'tag with incorrect tag name & missing tagger' '
426
426
This is an invalid tag.
427
427
EOF
428
428
429
- tag=$(git hash-object -t tag -w --stdin <wrong-tag) &&
429
+ tag=$(git hash-object --literally - t tag -w --stdin <wrong-tag) &&
430
430
test_when_finished "remove_object $tag" &&
431
431
echo $tag >.git/refs/tags/wrong &&
432
432
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)' '
558
558
test_expect_success ' force fsck to ignore double author' '
559
559
git cat-file commit HEAD >basis &&
560
560
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) &&
562
562
test_when_finished "remove_object $new" &&
563
563
git update-ref refs/heads/bogus "$new" &&
564
564
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' '
573
573
(git init null-blob &&
574
574
cd null-blob &&
575
575
sha=$(printf "100644 file$_bz$_bzoid" |
576
- git hash-object -w --stdin -t tree) &&
576
+ git hash-object --literally - w --stdin -t tree) &&
577
577
git fsck 2>out &&
578
578
test_i18ngrep "warning.*null sha1" out
579
579
)
@@ -583,7 +583,7 @@ test_expect_success 'fsck notices submodule entry pointing to null sha1' '
583
583
(git init null-commit &&
584
584
cd null-commit &&
585
585
sha=$(printf "160000 submodule$_bz$_bzoid" |
586
- git hash-object -w --stdin -t tree) &&
586
+ git hash-object --literally - w --stdin -t tree) &&
587
587
git fsck 2>out &&
588
588
test_i18ngrep "warning.*null sha1" out
589
589
)
@@ -648,7 +648,7 @@ test_expect_success 'NUL in commit' '
648
648
git commit --allow-empty -m "initial commitQNUL after message" &&
649
649
git cat-file commit HEAD >original &&
650
650
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 &&
652
652
git branch bad $(cat name) &&
653
653
654
654
test_must_fail git -c fsck.nulInCommit=error fsck 2>warn.1 &&
@@ -794,8 +794,8 @@ test_expect_success 'fsck errors in packed objects' '
794
794
git cat-file commit HEAD >basis &&
795
795
sed "s/</one/" basis >one &&
796
796
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) &&
799
799
pack=$(
800
800
{
801
801
echo $one &&
0 commit comments