Denote what ref we should match, though a symbolic name would be better.
authorStephen Haberman <stephen@exigencecorp.com>
Sun, 24 Aug 2008 21:08:15 +0000 (16:08 -0500)
committerStephen Haberman <stephen@exigencecorp.com>
Sun, 24 Aug 2008 21:08:15 +0000 (16:08 -0500)
server/update-stable
tests/t2100-server-update-stable.sh

index 64f7369..6c89e51 100644 (file)
@@ -36,7 +36,6 @@
 # would not have appeared in QA.
 #
 
-# Command line
 refname="$1"
 oldrev="$2"
 newrev="$3"
@@ -88,7 +87,7 @@ changed_lines=$(git diff $second_parent..$newrev | wc -l)
 if [ "$changed_lines" -ne "0" ] ; then
        echo "----------------------------------------------------"
        echo
-       echo "Moving stable must not result in any changes"
+       echo "Moving stable must not result in any changes from $second_parent"
        echo
        echo "----------------------------------------------------"
        exit 1
index 1364f5b..0ec4839 100644 (file)
@@ -16,7 +16,7 @@ test_expect_success 'setup' '
 # setup the update hook
 install_update_hook 'update-stable'
 
-test_expect_success 'initial stable commit works', '
+test_expect_success 'initial stable commit works' '
        # do one stable-less commit
        echo $test_name >a &&
        git commit -a -m "$test_name" &&
@@ -107,9 +107,10 @@ test_expect_success 'reject merge with changes' '
        # try merging topic4 into stable, which will get a merge commit, but
        # it should have changes involved and so get rejected
        git checkout stable &&
+       topic4_hash=$(git rev-parse topic4) &&
        git merge topic4 &&
        ! git push 2>push.err &&
-       cat push.err | grep "Moving stable must not result in any changes"
+       cat push.err | grep "Moving stable must not result in any changes from $topic4_hash"
 '
 
 test_done