3 test_description='server post-receive email notification'
7 test_expect_success 'setup' '
10 git commit -m "setup" &&
11 git clone ./. server &&
12 rm -fr server/.git/hooks &&
13 git remote add origin ./server &&
14 git config --add branch.master.remote origin &&
15 git config --add branch.master.merge refs/heads/master &&
16 GIT_DIR=./server/.git git config --add hooks.mailinglist commits@list.com &&
17 GIT_DIR=./server/.git git config --add hooks.debug true &&
21 install_server_hook 'post-receive-email' 'post-receive'
23 test_expect_success 'simple commit' '
25 git commit -a -m "$test_name" &&
27 old_commit_hash=$(git rev-parse HEAD^) &&
28 new_commit_hash=$(git rev-parse HEAD) &&
29 new_commit_date=$(git log -n 1 --pretty=format:%cd HEAD) &&
30 interpolate ../t2200-1.txt 1.txt old_commit_hash new_commit_hash new_commit_date &&
31 test_cmp 1.txt server/.git/refs.heads.master.out