mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:39:02 +02:00

Patching the subject line must be limited to the subject of the main patch itself. In particular, git formatted patches embedded in the patch must not be changed. Achieved by limiting the replacement to the lines until the first subject in the patch, just as it is done for modifying the first Signed-off-by. (From OE-Core rev: 2737bd1c3f7c51dd6509a0f91337f695f9c69165) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
14 lines
382 B
Bash
Executable File
14 lines
382 B
Bash
Executable File
#!/bin/sh
|
|
# Hook to add source component/revision info to commit message
|
|
# Parameter:
|
|
# $1 patch-file
|
|
# $2 revision
|
|
# $3 reponame
|
|
|
|
patchfile=$1
|
|
rev=$2
|
|
reponame=$3
|
|
|
|
sed -i -e "0,/^Subject:/s#^Subject: \[PATCH\] \($reponame: \)*\(.*\)#Subject: \[PATCH\] $reponame: \2#" $patchfile
|
|
sed -i -e "0,/^Signed-off-by:/s#\(^Signed-off-by:.*\)#\($reponame rev: $rev\)\n\n\1#" $patchfile
|