From: Stephen Haberman Date: Sun, 24 Aug 2008 21:08:15 +0000 (-0500) Subject: Denote what ref we should match, though a symbolic name would be better. X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=82befa65295a86d9903e6bec0d3ea2a62c3de8ca;p=git-central.git Denote what ref we should match, though a symbolic name would be better. --- diff --git a/server/update-stable b/server/update-stable index 64f7369..6c89e51 100644 --- a/server/update-stable +++ b/server/update-stable @@ -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 diff --git a/tests/t2100-server-update-stable.sh b/tests/t2100-server-update-stable.sh index 1364f5b..0ec4839 100644 --- a/tests/t2100-server-update-stable.sh +++ b/tests/t2100-server-update-stable.sh @@ -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