Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/t7614-merge-signoff.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / t7614-merge-signoff.sh` 72 lines ยท 1953 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='git merge --signoff 4 5 This test runs git merge --signoff and makes sure that it works. 6 ' 7 8 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 9 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 10 11 . ./test-lib.sh 12 13 # Setup test files 14 test_setup() { 15 # Expected commit message after merge --signoff 16 cat >expected-signed <.*/>/") 20 EOF 21 22 # Expected commit message after merge without --signoff (or with --no-signoff) 23 cat >expected-unsigned <actual && 49 test_cmp expected-signed actual 50 ' 51 52 # Test without --signoff flag 53 test_expect_success 'git merge does not add a sign-off line' ' 54 git checkout main && 55 test_commit main-branch-3 file3 3 && 56 git checkout other-branch && 57 git merge main --no-edit && 58 commit_body HEAD >actual && 59 test_cmp expected-unsigned actual 60 ' 61 62 # Test for --no-signoff flag 63 test_expect_success 'git merge --no-signoff flag cancels --signoff flag' ' 64 git checkout main && 65 test_commit main-branch-4 file4 4 && 66 git checkout other-branch && 67 git merge main --no-edit --signoff --no-signoff && 68 commit_body HEAD >actual && 69 test_cmp expected-unsigned actual 70 ' 71 72 test_done