]> git.ipfire.org Git - thirdparty/git.git/blame - t/t5405-send-pack-rewind.sh
l10n: fr v2.23.0 round 2
[thirdparty/git.git] / t / t5405-send-pack-rewind.sh
CommitLineData
6738c819
JH
1#!/bin/sh
2
3test_description='forced push to replace commit we do not have'
4
5. ./test-lib.sh
6
7test_expect_success setup '
8
9 >file1 && git add file1 && test_tick &&
10 git commit -m Initial &&
acd2a45b 11 git config receive.denyCurrentBranch warn &&
6738c819
JH
12
13 mkdir another && (
14 cd another &&
15 git init &&
8ee5d731 16 git fetch --update-head-ok .. master:master
6738c819
JH
17 ) &&
18
19 >file2 && git add file2 && test_tick &&
20 git commit -m Second
21
22'
23
24test_expect_success 'non forced push should die not segfault' '
25
26 (
27 cd another &&
fbd6ef27 28 test_must_fail git push .. master:master
6738c819
JH
29 )
30
31'
32
33test_expect_success 'forced push should succeed' '
34
35 (
36 cd another &&
37 git push .. +master:master
38 )
39
40'
41
42test_done