25
git repo-config branch.master.remote one &&
27
echo "URL: ../one/.git/"
28
echo "Pull: refs/heads/master:refs/heads/one"
25
git config branch.master.remote one &&
26
git config remote.one.url ../one/.git/ &&
27
git config remote.one.fetch refs/heads/master:refs/heads/one &&
31
29
git clone . three &&
33
git repo-config branch.master.remote two &&
34
git repo-config branch.master.merge refs/heads/one &&
31
git config branch.master.remote two &&
32
git config branch.master.merge refs/heads/one &&
33
mkdir -p .git/remotes &&
36
35
echo "URL: ../two/.git/"
37
36
echo "Pull: refs/heads/master:refs/heads/two"
38
37
echo "Pull: refs/heads/one:refs/heads/one"
38
} >.git/remotes/two &&
42
43
test_expect_success "fetch test" '
86
test_expect_success 'create bundle 1' '
88
echo >file updated again by origin &&
89
git commit -a -m "tip" &&
90
git bundle create bundle1 master^..master
93
test_expect_success 'header of bundle looks right' '
94
head -n 1 "$D"/bundle1 | grep "^#" &&
95
head -n 2 "$D"/bundle1 | grep "^-[0-9a-f]\{40\} " &&
96
head -n 3 "$D"/bundle1 | grep "^[0-9a-f]\{40\} " &&
97
head -n 4 "$D"/bundle1 | grep "^$"
100
test_expect_success 'create bundle 2' '
102
git bundle create bundle2 master~2..master
105
test_expect_failure 'unbundle 1' '
107
git checkout -b some-branch &&
108
git fetch "$D/bundle1" master:master
111
test_expect_success 'bundle 1 has only 3 files ' '
114
while read x && test -n "$x"
119
) <bundle1 >bundle.pack &&
120
git index-pack bundle.pack &&
121
verify=$(git verify-pack -v bundle.pack) &&
122
test 4 = $(echo "$verify" | wc -l)
125
test_expect_success 'unbundle 2' '
127
git fetch ../bundle2 master:master &&
128
test "tip" = "$(git log -1 --pretty=oneline master | cut -b42-)"
131
test_expect_success 'bundle does not prerequisite objects' '
135
git commit -m add.file2 file2 &&
136
git bundle create bundle3 -1 HEAD &&
138
while read x && test -n "$x"
143
) <bundle3 >bundle.pack &&
144
git index-pack bundle.pack &&
145
test 4 = $(git verify-pack -v bundle.pack | wc -l)