On 10/16/19 4:09 PM, Philippe Mathieu-Daude wrote:
Add a new script GitCcCmd.sh that git-send-email can use to
automatically determine which addresses to cc on patch submission.
Signed-off-by: Philippe Mathieu-Daude <phi...@redhat.com>
---
BaseTools/Scripts/GitCcCmd.sh | 38 +++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100755 BaseTools/Scripts/GitCcCmd.sh
diff --git a/BaseTools/Scripts/GitCcCmd.sh b/BaseTools/Scripts/GitCcCmd.sh
new file mode 100755
index 000000000000..3afdf3f1e40b
--- /dev/null
+++ b/BaseTools/Scripts/GitCcCmd.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+###
+# @file
+# Shell script to be called by 'git-send-email --cc-cmd' to pick the correct
+# maintainer emails for each patch when sending a series.
+#
+# Copyright (C) 2019, Red Hat, Inc.
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+# This script expects the following EDK2 environment variables defined:
+# - WORKSPACE
+# - EDK_TOOLS_PATH
+#
+###
+
+set -e
+
+#
+# git-send-email calls this script with a list of patches generated by
+# git-format-patch.
+#
+for arg in $@; do
+ case ${arg} in
+ *0000-cover-letter.patch)
+ break
+ ;;
+ *.patch)
+ test -e ${arg} && (
+ cd ${WORKSPACE} && \
+ head -1 < ${arg} \
+ | cut -d' ' -f2 \
+ | xargs python ${EDK_TOOLS_PATH}/Scripts/GetMaintainer.py --quiet
+ )
+ break
+ ;;
+ esac
+done
I meant to tag this patch RFC but forgot about it before sending, so
please consider it as RFC :)
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#49108): https://edk2.groups.io/g/devel/message/49108
Mute This Topic: https://groups.io/mt/34560656/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-