[kernel-team] 12/47: Process any 'Cc: stable' lines when formatting for backport
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Mon Dec 21 00:30:45 UTC 2015
This is an automated email from the git hooks/post-receive script.
benh pushed a commit to branch master
in repository kernel-team.
commit 7afa341b49f689a769ecaf8709cd1bd3923afa00
Author: Ben Hutchings <benh at debian.org>
Date: Sat May 19 15:36:28 2012 +0000
Process any 'Cc: stable' lines when formatting for backport
Patches in a stable queue should not include the Cc: stable line.
There may be a comment after the address specifying which versions
will need it; print that out after the filename so it's not lost.
svn path=/people/benh/; revision=19012
---
scripts/benh/git-format-patch-for-backport | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/scripts/benh/git-format-patch-for-backport b/scripts/benh/git-format-patch-for-backport
index f6fb4ff..e29bbbb 100755
--- a/scripts/benh/git-format-patch-for-backport
+++ b/scripts/benh/git-format-patch-for-backport
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2010 Ben Hutchings
+# Copyright 2010,2012 Ben Hutchings
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,11 +18,19 @@
set -e
git format-patch "$@" | while read name; do
- printf '%s\n' "$name"
+ printf '%s' "$name"
mv "$name" "$name".orig
- awk 'FNR == 1 { hash = $2 }
-FNR > 1 { print $0 }
-/^$/ && hash != "" { print "commit", hash, "upstream."; print; hash = "" }' \
- "$name".orig > "$name"
+ awk 'BEGIN { comment = 0; IGNORECASE = 1 }
+FNR == 1 { hash = $2 }
+/^Cc: <?stable@(vger\.)?kernel\.org/ {
+ gsub("^Cc:\\s*(.*<)?stable@(vger\\.)?kernel\\.org>? *", "");
+ print "", $0 >"/dev/stderr"
+ comment = 1
+ next
+}
+FNR > 1 { print }
+/^$/ && hash != "" { print "commit", hash, "upstream."; print; hash = "" }
+END { if (!comment) print "" >"/dev/stderr" }' \
+ "$name".orig 2>&1 >"$name"
rm "$name".orig
done
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/kernel-team.git
More information about the Kernel-svn-changes
mailing list