From 1e336dd91e749a66efbb841be368c944dfd6a4f2 Mon Sep 17 00:00:00 2001 From: Elyes Haouas Date: Fri, 21 Oct 2022 13:42:10 +0200 Subject: [PATCH] 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/68650 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons Reviewed-by: Martin L Roth --- util/scripts/update_submodules | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/util/scripts/update_submodules b/util/scripts/update_submodules index 6b8eb09960..4ca2925ff7 100755 --- a/util/scripts/update_submodules +++ b/util/scripts/update_submodules @@ -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}" -- )"