Get tests passing again.
[git-central.git] / tests / t2203-post-receive-email-stable.sh
index bf545f9..7240f0b 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 test_description='server post-receive email notification and how it behaves in our stable-based envrionment'
 
@@ -12,14 +12,14 @@ test_expect_success 'setup' '
        echo "setup" >c &&
        git add a b c &&
        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 &&
 
        git checkout -b stable &&
        git push origin stable
@@ -48,7 +48,7 @@ test_expect_success 'merge in stable' '
        echo "$test_name 2" >b &&
        echo "$test_name 2" >c &&
        git commit -a -m "move stable 2" &&
-       second_stable_hash=$(git rev-parse HEAD) &&
+       second_stable_abbrev=$(git rev-parse --short HEAD) &&
        git push origin stable &&
 
        # Merge stable
@@ -60,8 +60,8 @@ test_expect_success 'merge in stable' '
        new_commit_date=$(git log -n 1 --pretty=format:%cd HEAD) &&
        new_commit_abbrev=$(git rev-parse --short HEAD) &&
 
-       interpolate ../t2203-1.txt 1.txt old_commit_hash old_commit_abbrev new_commit_hash new_commit_abbrev new_commit_date first_stable_hash second_stable_hash &&
-       test_cmp 1.txt server/.git/refs.heads.topic1.out
+       interpolate ../t2203-1.txt 1.txt old_commit_hash old_commit_abbrev new_commit_hash new_commit_abbrev new_commit_date first_stable_hash second_stable_abbrev &&
+       test_cmp 1.txt server.git/refs.heads.topic1.out
 '
 
 test_expect_success 'merge in stable with conflict' '
@@ -84,7 +84,7 @@ test_expect_success 'merge in stable with conflict' '
        echo "$test_name 2" >b &&
        echo "$test_name 2" >c &&
        git commit -a -m "move stable 2" &&
-       second_stable_hash=$(git rev-parse HEAD) &&
+       second_stable_abbrev=$(git rev-parse --short HEAD) &&
        git push origin stable &&
 
        # Merge stable
@@ -99,8 +99,8 @@ test_expect_success 'merge in stable with conflict' '
        new_commit_date=$(git log -n 1 --pretty=format:%cd HEAD) &&
        new_commit_abbrev=$(git rev-parse --short HEAD) &&
 
-       interpolate ../t2203-2.txt 2.txt old_commit_hash old_commit_abbrev new_commit_hash new_commit_abbrev new_commit_date first_stable_hash second_stable_hash &&
-       test_cmp 2.txt server/.git/refs.heads.topic1.out
+       interpolate ../t2203-2.txt 2.txt old_commit_hash old_commit_abbrev new_commit_hash new_commit_abbrev new_commit_date first_stable_hash second_stable_abbrev &&
+       test_cmp 2.txt server.git/refs.heads.topic1.out
 '
 
 test_done