From 5033e2a5aa26dbb9a11e93426d878492732c5f63 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Thu, 18 Aug 2011 15:56:42 -0700 Subject: [PATCH] Update rfc.sh to assert divergence. assert_diverge didn't really _assert_ before, this change causes it to exit if there are no differences from origin/$branch. Change-Id: I2423ecd131b858519d4fa977b580dff511dc9b77 Reviewed-on: https://review.openstack.org/275 Reviewed-by: Monty Taylor Tested-by: Jenkins --- tools/rfc.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/rfc.sh b/tools/rfc.sh index f2fbfd2cbf..3801631886 100755 --- a/tools/rfc.sh +++ b/tools/rfc.sh @@ -91,13 +91,16 @@ rebase_changes() assert_diverge() { - git diff origin/$branch..HEAD | grep -q .; + if ! git diff origin/$branch..HEAD | grep -q . + then + echo "No changes between the current branch and origin/$branch." + exit 1 + fi } main() { - set_hooks_commit_msg; check_remote;