t/test-lib: add an SHA1 prerequisite
[git/debian.git] / t / t5405-send-pack-rewind.sh
blob4bda18a662da5a0c36ee007c37d9ded6be3b1832
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 &&
11 git config receive.denyCurrentBranch warn &&
13 mkdir another && (
14 cd another &&
15 git init &&
16 git fetch --update-head-ok .. master:master
17 ) &&
19 >file2 && git add file2 && test_tick &&
20 git commit -m Second
24 test_expect_success 'non forced push should die not segfault' '
27 cd another &&
28 git push .. master:master
29 test $? = 1
34 test_expect_success 'forced push should succeed' '
37 cd another &&
38 git push .. +master:master
43 test_done