util/scripts/cross-repo-cherrypick: Modify output format

As far as I know the Chromium OS team is the only user of this script,
so align its output with that of other tools used there:

- Replace "Original-Commit-Id" with "GitOrigin-RevId"
- Reuse Change-Id instead of moving it to the Original- prefix, which
  leads to the creation of a new Change ID.

Change-Id: I8c39c512901c83a64f00aa48a539e6621f827242
Signed-off-by: Patrick Georgi <patrick@coreboot.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60979
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
This commit is contained in:
Patrick Georgi 2022-01-10 22:41:03 +01:00
parent 0effeb576e
commit 7310789085
1 changed files with 5 additions and 2 deletions

View File

@ -50,19 +50,22 @@ GUID="$(git config user.name) <$(git config user.email)>"
(printf "${MESSAGE_PREFIX}"; commit_message) | tac | awk '/^$/ {
if (end==0) {
print "Original-Commit-Id: '"${CID}"'\nSigned-off-by: '"${GUID}"'";
print "GitOrigin-RevId: '"${CID}"'\nSigned-off-by: '"${GUID}"'";
'"${SPLICE_CMD}"'
}
end=1
}; /^(BUG|BRANCH|TEST)=/ {
if (end==0) {
print "Original-Commit-Id: '"${CID}"'\nSigned-off-by: '"${GUID}"'";
print "GitOrigin-RevId: '"${CID}"'\nSigned-off-by: '"${GUID}"'";
print "";
}
end=1
}; /^Cq-Depend:/ {
print $0;
next
}; /^Change-Id:/ {
print $0;
next
}; {
if (end==0)
print "Original-" $0;