summaryrefslogtreecommitdiffstats
path: root/rfc.sh
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2019-02-13 10:08:34 +0530
committerAmar Tumballi <amarts@redhat.com>2019-02-13 10:13:48 +0530
commit73d22d982b965f81a1fde2400b6d432242be0db5 (patch)
tree801652fb291bfd98ae68d2dd79e9afb034ec0dc9 /rfc.sh
parent017721e5cad5b8a5b498a06e54098ea920d5bc96 (diff)
rfc.sh: fix the missing rebase issue
When we decided to use clang-format for coding-style, and not bother about local `check-patch.pl`, we had commented out coding style check method in `./rfc.sh`. While it was intended and valid, we missed to see one major issue with that. `git fetch` command, which fetched latest code of the project, was inside the check_patches method, which also got missed. Even though we had an explicit 'rebase_orgin' method, it did nothing because the git fetch was not done before this. Now, calling an explicit git fetch, and removing dead code of check patches, as we are all fine with coding-style changes in last 4+ months. updates: bz#1193929 Change-Id: I3779096a527b93e780858ada8d988fdcdd6e2928 Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'rfc.sh')
-rwxr-xr-xrfc.sh39
1 files changed, 1 insertions, 38 deletions
diff --git a/rfc.sh b/rfc.sh
index 607fd7528fb..3277a4eaed5 100755
--- a/rfc.sh
+++ b/rfc.sh
@@ -185,43 +185,6 @@ assert_diverge()
}
-check_patches_for_coding_style()
-{
- git fetch $ORIGIN;
-
- check_patch_script=./build-aux/checkpatch.pl
- if [ ! -e ${check_patch_script} ] ; then
- echo "${check_patch_script} is not executable .. abort"
- exit 1
- fi
-
- # The URL of our Gerrit server
- export GERRIT_URL="review.gluster.org"
-
- echo "Running coding guidelines check ..."
- head=$(git rev-parse --abbrev-ref HEAD)
- # Kludge: "1>&2 && echo $? || echo $?" is to get around
- # "-e" from script invocation
- RES=$(git format-patch --stdout $ORIGIN/${branch}..${head} \
- | ${check_patch_script} --strict --terse - 1>&2 && echo $? || echo $?)
- if [ "$RES" -eq 1 ] ; then
- echo "Errors caught, get details by:"
- echo " git format-patch --stdout $ORIGIN/${branch}..${head} \\"
- echo " | ${check_patch_script} --strict --gerrit-url ${GERRIT_URL} -"
- echo "and correct errors"
- exit 1
- elif [ "$RES" -eq 2 ] ; then
- echo "Warnings or checks caught, get details by:"
- echo " git format-patch --stdout $ORIGIN/${branch}..${head} \\"
- echo " | ${check_patch_script} --strict --gerrit-url ${GERRIT_URL} -"
- echo -n "Do you want to continue anyway [no/yes]: "
- read yesno
- if [ "${yesno}" != "yes" ] ; then
- echo "Aborting..."
- exit 1
- fi
- fi
-}
# Regex elaborated:
# grep -w -> --word-regexp (from the man page)
@@ -303,7 +266,7 @@ main()
return;
fi
- # check_patches_for_coding_style
+ git fetch $ORIGIN;
rebase_changes;