From 7980b6ed47e35bba343705606bf5131df470ae18 Mon Sep 17 00:00:00 2001 From: Felix Singer Date: Tue, 12 Nov 2024 23:00:24 +0100 Subject: util/scripts/update_submodule: Extend commit ids to 12 chars Checkpatch suggests to use 12 chars of the commit id. So adjust the submodule update script in order to be consistent. Change-Id: I0e356066b6598f586054f940684c26b6e5db2169 Signed-off-by: Felix Singer Reviewed-on: https://review.coreboot.org/c/coreboot/+/85112 Tested-by: build bot (Jenkins) Reviewed-by: Matt DeVillier --- util/scripts/update_submodules | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'util') diff --git a/util/scripts/update_submodules b/util/scripts/update_submodules index 9f6c14f5b0..48bb7f71bb 100755 --- a/util/scripts/update_submodules +++ b/util/scripts/update_submodules @@ -102,7 +102,7 @@ main() { exit 1 fi - initial_commit_id="$(git log --pretty='%h' -n 1)" + initial_commit_id="$(git log --pretty='%h' -n 1 --abbrev=12)" initial_commit_description="$(git log --pretty='%ci - (%s)' -n 1)" if [[ ${skip_sync} != "1" ]]; then git fetch 2>/dev/null @@ -116,14 +116,14 @@ main() { fi done - updated_commit_id="$(git log --pretty='%h' -n 1 "${branch_name}" -- )" + updated_commit_id="$(git log --pretty='%h' -n 1 --abbrev=12 "${branch_name}" -- )" updated_commit_description="$(git log --pretty='%ci - (%s)' -n 1 "${updated_commit_id}")" if [ "${initial_commit_id}" = "${updated_commit_id}" ]; then echo "No updates for ${submodule}" continue fi SUBMODULES_WITH_UPDATES+=1 - update_log="$(git log --oneline "${initial_commit_id}..${updated_commit_id}")" + update_log="$(git log --oneline --abbrev=12 "${initial_commit_id}..${updated_commit_id}")" update_count="$(echo "${update_log}" | wc -l)" if [[ "${update_count}" -gt "${max_commits_to_list}" ]]; then update_log="" -- cgit v1.2.3