[Libreoffice-commits] dev-tools.git: scripts/git-cherry-gerrit
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Mon Feb 15 10:36:24 UTC 2021
scripts/git-cherry-gerrit | 58 ----------------------------------------------
1 file changed, 58 deletions(-)
New commits:
commit 94b6c4581988a8c48c0ea8ef49ad1735cf909b70
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Feb 15 11:35:12 2021 +0100
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Feb 15 11:35:12 2021 +0100
git-cherry-gerrit: remove the old bash version
There is a faster python version, let's delete the bash one before some
parallel development would be needed.
Change-Id: I2343d6ce5a0450576edfd8fbcecac32a3951a31a
diff --git a/scripts/git-cherry-gerrit b/scripts/git-cherry-gerrit
deleted file mode 100755
index 9507de2..0000000
--- a/scripts/git-cherry-gerrit
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/env bash
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at https://mozilla.org/MPL/2.0/.
-#
-# A version of 'git cherry' that works with change-ids, so it can pair patches
-# even if their patch id changed.
-#
-
-cherry_from=${1}
-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] [whitelist_file]"
- exit 1;
-fi
-
-merge_base=$(git merge-base $cherry_from $cherry_to)
-
-if [ -z "$branch_point" ] ; then
- branch_point=${merge_base}
-fi
-
-: > /tmp/tohashes
-to_hashes=$(git rev-list ${merge_base}..${cherry_to})
-for hash in ${to_hashes}
-do
- git cat-file commit $hash |grep Change-Id: >> /tmp/tohashes
-done
-
-from_hashes=$(git rev-list ${branch_point}..${cherry_from})
-for hash in ${from_hashes}
-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 -F "${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
- pretty=`git --no-pager log -1 --format='format:%h%x09%an%x09%s%x0a' $hash`
- 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
-done
-
-rm -f /tmp/tohashes
-
-# vim:set shiftwidth=4 softtabstop=4 expandtab:
More information about the Libreoffice-commits
mailing list