[Libreoffice-commits] dev-tools.git: scripts/git-cherry-gerrit
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Tue Aug 27 15:58:41 UTC 2019
scripts/git-cherry-gerrit | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 75e295277042a1a89e177e00ae23327236327004
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Tue Aug 27 17:57:35 2019 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Tue Aug 27 17:58:22 2019 +0200
git-cherry-gerrit: use grep -F when searching in the whitelist file
So in case you whitelisted a commit which has a first line:
[topic] foo bar
Then the whitelist entry won't be ignored, just because [ and ] have
special meaning in the regex case.
Change-Id: Idf5c5502c5f0b54cd98461de65a44cf444f41d59
diff --git a/scripts/git-cherry-gerrit b/scripts/git-cherry-gerrit
index 8e1d9a1..7e14549 100755
--- a/scripts/git-cherry-gerrit
+++ b/scripts/git-cherry-gerrit
@@ -39,7 +39,7 @@ 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`
- if [ -z "${whitelist_file}" ] || ! grep -q "${pretty}" "${whitelist_file}"; then
+ if [ -z "${whitelist_file}" ] || ! grep -q -F "${pretty}" "${whitelist_file}"; then
echo "WARNING: commit '$pretty' has no Change-Id, assuming it has to be cherry-picked."
fi
continue
@@ -47,7 +47,7 @@ do
if ! grep -q "$changeid" /tmp/tohashes; then
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
+ if [ -z "${whitelist_file}" ] || ! grep -q -F "${pretty}" "${whitelist_file}"; then
git --no-pager log -1 --format='format:%h%x09%an%x09%s%x0a' $hash
fi
fi
More information about the Libreoffice-commits
mailing list