summaryrefslogtreecommitdiffstats
path: root/rfc.sh
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2011-07-23 06:03:18 +0200
committerAnand Avati <avati@gluster.com>2011-07-23 09:09:43 -0700
commit2c068a98e4b0bf54e7553ed7411fa8c7fe3173ba (patch)
treea7ecc0f17e85923d8ad631b65121fa9b235ef39f /rfc.sh
parent434da60ba4ce9a2b47ea47a7790ce48a342de00a (diff)
gerrit: add a dry-run mode to rfc script
With DRY_RUN=1, rfc.sh will not perform the git push just display the push command. This can be useful if one wants to give a final review for the submitted change list (check for typos, misplaced bug id-s) or if one is offline. Change-Id: I90e2016ba78e2a0ecf37044b3db0277a25914f77 BUG: 3234 Reviewed-on: http://review.gluster.com/87 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
Diffstat (limited to 'rfc.sh')
-rwxr-xr-xrfc.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/rfc.sh b/rfc.sh
index 8dad0af..2a5e779 100755
--- a/rfc.sh
+++ b/rfc.sh
@@ -94,10 +94,16 @@ function main()
bug=$(git show --format='%b' | grep -i '^BUG: ' | awk '{print $2}');
+ if [ "$DRY_RUN" = 1 ]; then
+ drier='echo -e Please use the following command to send your commits to review:\n\n'
+ else
+ drier=
+ fi
+
if [ -z "$bug" ]; then
- git push origin HEAD:refs/for/$branch/rfc;
+ $drier git push origin HEAD:refs/for/$branch/rfc;
else
- git push origin HEAD:refs/for/$branch/bug-$bug;
+ $drier git push origin HEAD:refs/for/$branch/bug-$bug;
fi
}