From c29f98fe6b8bccfe3de69db5eb66456f7f8567a4 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Fri, 23 Sep 2011 12:14:20 +0100 Subject: [PATCH] Fix rfc.sh's check for the project From 'git remote show origin' we get 'openstack/nova.git' but gerrit's ls-projects returns 'openstack/nova' Change-Id: I4ea6361633d0e94895dbbdaf3837f12c6c307bfc --- tools/rfc.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/rfc.sh b/tools/rfc.sh index 0bc15319..901fade1 100755 --- a/tools/rfc.sh +++ b/tools/rfc.sh @@ -48,13 +48,13 @@ add_remote() if project_list=`ssh -p29418 -o StrictHostKeyChecking=no $username@review.openstack.org gerrit ls-projects 2>/dev/null` then echo "$username@review.openstack.org:29418 worked." - if echo $project_list | grep $project >/dev/null + if echo $project_list | grep -w "${project%.git}" >/dev/null then echo "Creating a git remote called gerrit that maps to:" echo " ssh://$username@review.openstack.org:29418/$project" git remote add gerrit ssh://$username@review.openstack.org:29418/$project else - echo "The current project name, $project, is not a known project." + echo "The current project name, ${project%.git}, is not a known project." echo "Please either reclone from github/gerrit or create a" echo "remote named gerrit that points to the intended project." return 1