diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2022-08-09 08:12:52 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2022-08-09 08:14:10 +0000 |
commit | 836b21266129dd66906ab07766346486a79aef81 (patch) | |
tree | 5ca536380bddc749f4137aaab26d9fc235ab0845 | |
parent | 0a758afffc858d8ee627efe17cd4c07f335ea7c1 (diff) |
round-robin.sh: Fix "git rev-parse" of short histories
"git rev-parse" will exit with non-zero and break
update_baseline() on short histories of base-artifacts.git.
Change-Id: Ie6073ed0f7fa3ae72b6d561505ab2097626b22f5
-rw-r--r-- | round-robin.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/round-robin.sh b/round-robin.sh index de737cf0..a1fe2fcd 100644 --- a/round-robin.sh +++ b/round-robin.sh @@ -796,8 +796,8 @@ update_baseline () # - NN-<step> directories are non-essential, the rest -- jenkins/, # dashboard/, etc. -- are essential. local old_commit - old_commit=$(git -C base-artifacts rev-parse HEAD~100 \ - 2>/dev/null) + old_commit=$(git -C base-artifacts rev-parse --verify HEAD~100 \ + 2>/dev/null || true) if [ x"$old_commit" != x"" ]; then local head |