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/t5402-post-merge-hook.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 / t5402-post-merge-hook.sh` 61 lines ยท 1688 bytes Raw Blame History 1 #!/bin/sh 2 # 3 # Copyright (c) 2006 Josh England 4 # 5 6 test_description='Test the post-merge hook.' 7 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 8 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 9 10 . ./test-lib.sh 11 12 test_expect_success setup ' 13 echo Data for commit0. >a && 14 git update-index --add a && 15 tree0=$(git write-tree) && 16 commit0=$(echo setup | git commit-tree $tree0) && 17 echo Changed data for commit1. >a && 18 git update-index a && 19 tree1=$(git write-tree) && 20 commit1=$(echo modify | git commit-tree $tree1 -p $commit0) && 21 git update-ref refs/heads/main $commit0 && 22 git clone ./. clone1 && 23 GIT_DIR=clone1/.git git update-index --add a && 24 git clone ./. clone2 && 25 GIT_DIR=clone2/.git git update-index --add a 26 ' 27 28 test_expect_success 'setup clone hooks' ' 29 test_when_finished "rm -f hook" && 30 cat >hook <<-\EOF && 31 echo $@ >>$GIT_DIR/post-merge.args 32 EOF 33 34 test_hook --setup -C clone1 post-merge