scripts/git-cherry-gerrit | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
New commits: commit 2a2a76d9e19bdadf0518e9223244faf0c0e81d6e Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Tue Jul 30 10:28:12 2019 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Tue Jul 30 10:30:17 2019 +0200 git-cherry-gerrit: add support for an optional whitelist file So that in case a change-id is missing and it was reviewed once, no need to do it again all the time. Change-Id: I29c28b71053b5b0dd4460b3ad66cfcb96936a17c diff --git a/scripts/git-cherry-gerrit b/scripts/git-cherry-gerrit index 0505383..8e1d9a1 100755 --- a/scripts/git-cherry-gerrit +++ b/scripts/git-cherry-gerrit @@ -13,8 +13,10 @@ cherry_to=${2} branch_point=${3} +whitelist_file=${4} + if [ -z "$cherry_from" ] ; then - echo "Usage: git-cherry-gerrit cherry_from cherry_to [branch_point_from]" + echo "Usage: git-cherry-gerrit cherry_from cherry_to [branch_point_from] [whitelist_file]" exit 1; fi @@ -37,12 +39,17 @@ do changeid="$(git cat-file commit $hash |grep Change-Id:)" if [ -z "$changeid" ]; then pretty=`git --no-pager log -1 --format='format:%h%x09%an%x09%s%x0a' $hash` - echo "WARNING: commit '$pretty' has no Change-Id, assuming it has to be cherry-picked." + if [ -z "${whitelist_file}" ] || ! grep -q "${pretty}" "${whitelist_file}"; then + echo "WARNING: commit '$pretty' has no Change-Id, assuming it has to be cherry-picked." + fi continue fi if ! grep -q "$changeid" /tmp/tohashes; then - git --no-pager log -1 --format='format:%h%x09%an%x09%s%x0a' $hash + pretty=`git --no-pager log -1 --format='format:%h%x09%an%x09%s%x0a' $hash` + if [ -z "${whitelist_file}" ] || ! grep -q "${pretty}" "${whitelist_file}"; then + git --no-pager log -1 --format='format:%h%x09%an%x09%s%x0a' $hash + fi fi done _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits