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>
diff --git a/util/scripts/cross-repo-cherrypick b/util/scripts/cross-repo-cherrypick
index c640e33..7442b9b 100755
--- a/util/scripts/cross-repo-cherrypick
+++ b/util/scripts/cross-repo-cherrypick
@@ -50,19 +50,22 @@
(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;