summaryrefslogtreecommitdiff
path: root/t/t5500-fetch-pack.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t5500-fetch-pack.sh')
-rwxr-xr-xt/t5500-fetch-pack.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
index fa10840303..77c3c575d8 100755
--- a/t/t5500-fetch-pack.sh
+++ b/t/t5500-fetch-pack.sh
@@ -135,8 +135,13 @@ test_expect_success "clone shallow" "git-clone --depth 2 . shallow"
test_expect_success "clone shallow object count" \
"test \"in-pack: 18\" = \"$(grep in-pack count.shallow)\""
-test_expect_success "clone shallow object count (part 2)" \
- "test -z \"$(grep -v in-pack count.shallow | sed "s/^.*: 0//")\""
+count_output () {
+ sed -e '/^in-pack:/d' -e '/^packs:/d' -e '/: 0$/d' "$1"
+}
+
+test_expect_success "clone shallow object count (part 2)" '
+ test -z "$(count_output count.shallow)"
+'
test_expect_success "fsck in shallow repo" \
"(cd shallow; git-fsck-objects --full)"