summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Singer <felixsinger@posteo.net>2024-11-12 23:00:24 +0100
committerElyes Haouas <ehaouas@noos.fr>2024-11-13 16:23:55 +0000
commit7980b6ed47e35bba343705606bf5131df470ae18 (patch)
treecdeaad16537c8b6a437c73518391e88f2fe84f7d
parent8808e8c2b124dd8641754bdef4a47a8369158518 (diff)
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 <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/85112 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
-rwxr-xr-xutil/scripts/update_submodules6
1 files changed, 3 insertions, 3 deletions
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=""