Merge branch 'lt/maint-wrap-zlib' into maint
[git/jnareb-git.git] / t / t5405-send-pack-rewind.sh
blobcb9aacc7bc62e2ecfdca0dc7f6071e5330fe09d0
1 #!/bin/sh
3 test_description='forced push to replace commit we do not have'
5 . ./test-lib.sh
7 test_expect_success setup '
9 >file1 && git add file1 && test_tick &&
10 git commit -m Initial &&
12 mkdir another && (
13 cd another &&
14 git init &&
15 git fetch --update-head-ok .. master:master
16 ) &&
18 >file2 && git add file2 && test_tick &&
19 git commit -m Second
23 test_expect_success 'non forced push should die not segfault' '
26 cd another &&
27 git push .. master:master
28 test $? = 1
33 test_expect_success 'forced push should succeed' '
36 cd another &&
37 git push .. +master:master
42 test_done