~ubuntu-branches/ubuntu/intrepid/git-core/intrepid-updates

« back to all changes in this revision

Viewing changes to t/t5500-fetch-pack.sh

  • Committer: Package Import Robot
  • Author(s): Gerrit Pape
  • Date: 2007-04-22 13:31:05 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: package-import@ubuntu.com-20070422133105-xg8fnm18r2cxcbg1
Tags: upstream-1.5.1.2
ImportĀ upstreamĀ versionĀ 1.5.1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
        case "$heads" in *B*) echo $BTIP > .git/refs/heads/B;; esac
64
64
        git-symbolic-ref HEAD refs/heads/`echo $heads | sed -e 's/^\(.\).*$/\1/'`
65
65
 
66
 
        test_expect_success "fsck" 'git-fsck-objects --full > fsck.txt 2>&1'
 
66
        test_expect_success "fsck" 'git-fsck --full > fsck.txt 2>&1'
67
67
 
68
68
        test_expect_success 'check downloaded results' \
69
69
        'mv .git/objects/pack/pack-* . &&
70
70
         p=`ls -1 pack-*.pack` &&
71
71
         git-unpack-objects <$p &&
72
 
         git-fsck-objects --full'
 
72
         git-fsck --full'
73
73
 
74
74
        test_expect_success "new object count after $number pull" \
75
75
        'idx=`echo pack-*.idx` &&
97
97
(
98
98
        mkdir client &&
99
99
        cd client &&
100
 
        git-init-db 2>> log2.txt
 
100
        git-init 2>> log2.txt &&
 
101
        git config transfer.unpacklimit 0
101
102
)
102
103
 
103
104
add A1
128
129
 
129
130
pull_to_client 3rd "A" $((1*3)) # old fails
130
131
 
 
132
test_expect_success "clone shallow" "git-clone --depth 2 . shallow"
 
133
 
 
134
(cd shallow; git-count-objects -v) > count.shallow
 
135
 
 
136
test_expect_success "clone shallow object count" \
 
137
        "test \"in-pack: 18\" = \"$(grep in-pack count.shallow)\""
 
138
 
 
139
count_output () {
 
140
        sed -e '/^in-pack:/d' -e '/^packs:/d' -e '/: 0$/d' "$1"
 
141
}
 
142
 
 
143
test_expect_success "clone shallow object count (part 2)" '
 
144
        test -z "$(count_output count.shallow)"
 
145
'
 
146
 
 
147
test_expect_success "fsck in shallow repo" \
 
148
        "(cd shallow; git-fsck --full)"
 
149
 
 
150
#test_done; exit
 
151
 
 
152
add B66 $B65
 
153
add B67 $B66
 
154
 
 
155
test_expect_success "pull in shallow repo" \
 
156
        "(cd shallow; git pull .. B)"
 
157
 
 
158
(cd shallow; git-count-objects -v) > count.shallow
 
159
test_expect_success "clone shallow object count" \
 
160
        "test \"count: 6\" = \"$(grep count count.shallow)\""
 
161
 
 
162
add B68 $B67
 
163
add B69 $B68
 
164
 
 
165
test_expect_success "deepening pull in shallow repo" \
 
166
        "(cd shallow; git pull --depth 4 .. B)"
 
167
 
 
168
(cd shallow; git-count-objects -v) > count.shallow
 
169
test_expect_success "clone shallow object count" \
 
170
        "test \"count: 12\" = \"$(grep count count.shallow)\""
 
171
 
 
172
test_expect_success "deepening fetch in shallow repo" \
 
173
        "(cd shallow; git fetch --depth 4 .. A:A)"
 
174
 
 
175
(cd shallow; git-count-objects -v) > count.shallow
 
176
test_expect_success "clone shallow object count" \
 
177
        "test \"count: 18\" = \"$(grep count count.shallow)\""
 
178
 
 
179
test_expect_failure "pull in shallow repo with missing merge base" \
 
180
        "(cd shallow; git pull --depth 4 .. A)"
 
181
 
131
182
test_done