Replace redundant yread() with read_in_full() in fast-import.
[gitweb.git] / t / t5500-fetch-pack.sh
index fa108403033cb4329c3ad098b63250e724988a51..ef78df67ea39e619f1118f427ad4dcc07e923bca 100755 (executable)
@@ -97,7 +97,7 @@ pull_to_client () {
 (
        mkdir client &&
        cd client &&
-       git-init-db 2>> log2.txt
+       git-init 2>> log2.txt
 )
 
 add A1
@@ -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)"