3 test_description='fetch/push involving alternates'
10 sed -n -e 's/^count: \(.*\)/loose=\1/p' \
11 -e 's/^in-pack: \(.*\)/inpack=\1/p'
13 echo $(( $loose + $inpack ))
17 test_expect_success setup '
26 git commit -m "$i" || exit
31 git clone --reference=original "file:///$(pwd)/original" one &&
36 count_objects >../one.count
38 A=$(pwd)/original/.git/objects &&
40 echo "$A" >receiver/.git/objects/info/alternates &&
42 echo "$A" >fetcher/.git/objects/info/alternates
45 test_expect_success 'pushing into a repository with the same alternate' '
48 git push ../receiver master:refs/heads/it
52 count_objects >../receiver.count
54 test_cmp one.count receiver.count
57 test_expect_success 'fetching from a repository with the same alternate' '
60 git fetch ../one master:refs/heads/it &&
61 count_objects >../fetcher.count
63 test_cmp one.count fetcher.count