diff --git a/scripts/release/check_commit_metadata.sh b/scripts/release/check_commit_metadata.sh index 507e8d8d797a7..dff4cb1c738fc 100755 --- a/scripts/release/check_commit_metadata.sh +++ b/scripts/release/check_commit_metadata.sh @@ -126,6 +126,7 @@ main() { log "Found renamed cherry-pick commit ${commit1} -> ${renamed}" renamed_cherry_pick_commits[${commit1}]=${renamed} renamed_cherry_pick_commits[${renamed}]=${commit1} + i=$((i - 1)) continue fi @@ -147,6 +148,11 @@ main() { log "Found matching cherry-pick commit ${commit} -> ${renamed_cherry_pick_commits[${commit}]}" done + # Merge the two maps. + for commit in "${!renamed_cherry_pick_commits[@]}"; do + cherry_pick_commits[${commit}]=${renamed_cherry_pick_commits[${commit}]} + done + # Get abbreviated and full commit hashes and titles for each commit. git_log_out="$(git log --no-merges --left-right --pretty=format:"%m %h %H %s" "${range}")" if [[ -z ${git_log_out} ]]; then