Get tests passing again.
[git-central.git] / tests / t2202-post-receive-email-branches.sh
index d794b11..a9d6658 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 test_description='server post-receive email notification'
 
@@ -10,14 +10,14 @@ test_expect_success 'setup' '
        echo "setup" >a &&
        git add a &&
        git commit -m "setup" &&
-       git clone ./. server &&
-       rm -fr server/.git/hooks &&
-       git remote add origin ./server &&
+       git clone -l . --bare server.git &&
+       rm -fr server.git/hooks &&
+       git remote add origin ./server.git &&
        git config branch.master.remote origin &&
        git config branch.master.merge refs/heads/master &&
-       GIT_DIR=./server/.git git config hooks.post-receive-email.mailinglist commits@list.com &&
-       GIT_DIR=./server/.git git config hooks.post-receive-email.debug true &&
-       echo cbas >./server/.git/description
+       GIT_DIR=./server.git git config hooks.post-receive-email.mailinglist commits@list.com &&
+       GIT_DIR=./server.git git config hooks.post-receive-email.debug true &&
+       echo cbas >./server.git/description
 '
 
 install_post_receive_hook 'post-receive-email'
@@ -38,7 +38,7 @@ test_expect_success 'create branch' '
        git push origin topic &&
 
        interpolate ../t2202-1.txt 1.txt new_commit_hash new_commit_abbrev new_commit_date prior_commit_hash prior_commit_date &&
-       test_cmp 1.txt server/.git/refs.heads.topic.out
+       test_cmp 1.txt server.git/refs.heads.topic.out
 '
 
 test_expect_success 'create branch with existing commits does not replay them' '
@@ -50,7 +50,7 @@ test_expect_success 'create branch with existing commits does not replay them' '
        git push origin topic2 &&
 
        interpolate ../t2202-3.txt 3.txt existing_commit_hash existing_commit_abbrev existing_commit_date &&
-       test_cmp 3.txt server/.git/refs.heads.topic2.out
+       test_cmp 3.txt server.git/refs.heads.topic2.out
 '
 
 test_expect_success 'update branch with existing commits does not replay them' '
@@ -69,7 +69,7 @@ test_expect_success 'update branch with existing commits does not replay them' '
        git push &&
 
        interpolate ../t2202-4.txt 4.txt old_commit_hash old_commit_abbrev existing_commit_hash existing_commit_abbrev &&
-       test_cmp 4.txt server/.git/refs.heads.topic.out
+       test_cmp 4.txt server.git/refs.heads.topic.out
 '
 
 test_expect_success 'rewind branch' '
@@ -82,7 +82,7 @@ test_expect_success 'rewind branch' '
        new_commit_hash=$(git rev-parse HEAD) &&
 
        interpolate ../t2202-5.txt 5.txt old_commit_hash new_commit_hash old_commit_abbrev &&
-       test_cmp 5.txt server/.git/refs.heads.topic.out
+       test_cmp 5.txt server.git/refs.heads.topic.out
 '
 
 test_expect_success 'rewind and continue branch' '
@@ -99,7 +99,7 @@ test_expect_success 'rewind and continue branch' '
 
        git push --force &&
        interpolate ../t2202-6.txt 6.txt old_commit_hash new_commit_hash new_commit_date new_commit_abbrev old_commit_abbrev &&
-       test_cmp 6.txt server/.git/refs.heads.topic.out
+       test_cmp 6.txt server.git/refs.heads.topic.out
 '
 
 test_expect_success 'delete branch' '
@@ -107,7 +107,7 @@ test_expect_success 'delete branch' '
        git push origin :refs/heads/topic &&
 
        interpolate ../t2202-2.txt 2.txt old_commit_hash &&
-       test_cmp 2.txt server/.git/refs.heads.topic.out
+       test_cmp 2.txt server.git/refs.heads.topic.out
 '
 
 test_done