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>
This commit is contained in:
parent
8808e8c2b1
commit
7980b6ed47
1 changed files with 3 additions and 3 deletions
|
|
@ -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=""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue