summaryrefslogtreecommitdiff
path: root/t/t1006-cat-file.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t1006-cat-file.sh')
-rwxr-xr-xt/t1006-cat-file.sh17
1 files changed, 8 insertions, 9 deletions
diff --git a/t/t1006-cat-file.sh b/t/t1006-cat-file.sh
index 658628375c..39382fa195 100755
--- a/t/t1006-cat-file.sh
+++ b/t/t1006-cat-file.sh
@@ -211,14 +211,14 @@ done
test_expect_success "--batch-check for a non-existent named object" '
test "foobar42 missing
foobar84 missing" = \
- "$( ( echo foobar42; echo_without_newline foobar84; ) | git cat-file --batch-check)"
+ "$( ( echo foobar42 && echo_without_newline foobar84 ) | git cat-file --batch-check)"
'
test_expect_success "--batch-check for a non-existent hash" '
test "0000000000000000000000000000000000000042 missing
0000000000000000000000000000000000000084 missing" = \
- "$( ( echo 0000000000000000000000000000000000000042;
- echo_without_newline 0000000000000000000000000000000000000084; ) |
+ "$( ( echo 0000000000000000000000000000000000000042 &&
+ echo_without_newline 0000000000000000000000000000000000000084 ) |
git cat-file --batch-check)"
'
@@ -226,8 +226,8 @@ test_expect_success "--batch for an existent and a non-existent hash" '
test "$tag_sha1 tag $tag_size
$tag_content
0000000000000000000000000000000000000000 missing" = \
- "$( ( echo $tag_sha1;
- echo_without_newline 0000000000000000000000000000000000000000; ) |
+ "$( ( echo $tag_sha1 &&
+ echo_without_newline 0000000000000000000000000000000000000000 ) |
git cat-file --batch)"
'
@@ -283,7 +283,7 @@ test_expect_success "--batch-check with multiple sha1s gives correct format" '
test_expect_success 'setup blobs which are likely to delta' '
test-tool genrandom foo 10240 >foo &&
- { cat foo; echo plus; } >foo-plus &&
+ { cat foo && echo plus; } >foo-plus &&
git add foo foo-plus &&
git commit -m foo &&
cat >blobs <<-\EOF
@@ -452,9 +452,8 @@ test_expect_success 'the --allow-unknown-type option does not consider replaceme
# Create it manually, as "git replace" will die on bogus
# types.
head=$(git rev-parse --verify HEAD) &&
- test_when_finished "rm -rf .git/refs/replace" &&
- mkdir -p .git/refs/replace &&
- echo $head >.git/refs/replace/$bogus_short_sha1 &&
+ test_when_finished "test-tool ref-store main delete-refs 0 msg refs/replace/$bogus_short_sha1" &&
+ test-tool ref-store main update-ref msg "refs/replace/$bogus_short_sha1" $head $ZERO_OID REF_SKIP_OID_VERIFICATION &&
cat >expect <<-EOF &&
commit