scripts/update_submodules: Fix "bad revision" error

Fix "bad revision" error when we run "update_submodules" with no option.
This adds "origin/trunk" branch name for "util/goswid".

Change-Id: Ie84d40fa00c6d0032b93917ad96e60120388eab5
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68650
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
This commit is contained in:
Elyes Haouas 2022-10-21 13:42:10 +02:00 committed by Martin L Roth
parent 08e7df9d5d
commit 1e336dd91e
1 changed files with 3 additions and 1 deletions

View File

@ -110,8 +110,10 @@ main() {
if git branch -a | grep -q "origin/main"; then
branch_name="origin/main"
else
elif git branch -a | grep -q "origin/master"; then
branch_name="origin/master"
elif git branch -a | grep -q "origin/trunk"; then
branch_name="origin/trunk"
fi
updated_commit_id="$(git log --pretty='%h' -n 1 "${branch_name}" -- )"