Merge commit 'junio/next' into next
[git/platforms/storm.git] / t / t5407-send-pack-shared.sh
blobc31322c9cdb0e903d758811a915095cbf9319756
1 #!/bin/sh
3 test_description='shared repository workflow, not sending too many'
5 . ./test-lib.sh
7 commit () {
8 test_tick &&
9 echo >file "$1" &&
10 git add file &&
11 git commit -m "$1"
14 test_expect_success setup '
16 test_create_repo shared &&
18 cd shared &&
19 for i in 1 2 3 4 5 6 7 8 9 10
21 commit $i || exit 1
22 done
23 ) &&
25 git clone shared one &&
26 git clone shared two &&
29 cd one &&
30 for i in 11 12 13 14
32 commit $i || exit 1
33 done
34 git push origin master
35 ) &&
38 cd shared &&
39 git fsck-objects --full &&
40 git prune
44 test_expect_success 'push from side' '
47 cd two &&
48 for i in 15 16 17
50 commit $i || exit 1
51 done
52 git push --verbose origin master:refs/heads/side 2>../log
53 ) &&
54 tr "\015" "\012" < log >out &&
55 grep "^Total 9 " out
59 test_done