Skip to content

Commit 96614e7

Browse files
committed
Merge branch 'sp/t5500-cleanup'
Test clean-up. * sp/t5500-cleanup: t5500: simplify test implementation and fix git exit code suppression
2 parents 7758f84 + a824421 commit 96614e7

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

t/t5500-fetch-pack.sh

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -892,15 +892,20 @@ test_expect_success 'shallow since with commit graph and already-seen commit' '
892892
test_commit other &&
893893
git commit-graph write --reachable &&
894894
git config core.commitGraph true &&
895-
896-
GIT_PROTOCOL=version=2 git upload-pack . <<-EOF >/dev/null
897-
0012command=fetch
898-
$(echo "object-format=$(test_oid algo)" | packetize)
899-
00010013deepen-since 1
900-
$(echo "want $(git rev-parse other)" | packetize)
901-
$(echo "have $(git rev-parse main)" | packetize)
895+
oid_algo=$(test_oid algo) &&
896+
oid_other=$(git rev-parse other) &&
897+
oid_main=$(git rev-parse main) &&
898+
899+
test-tool pkt-line pack >input <<-EOF &&
900+
command=fetch
901+
object-format=$oid_algo
902+
0001
903+
deepen-since 1
904+
want $oid_other
905+
have $oid_main
902906
0000
903907
EOF
908+
GIT_PROTOCOL=version=2 git upload-pack . <input >/dev/null
904909
)
905910
'
906911

0 commit comments

Comments
 (0)