summaryrefslogtreecommitdiff
path: root/script/update/project/repo
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-09-25 12:17:02 +0100
committerLeah Rowe <leah@libreboot.org>2023-09-25 12:21:23 +0100
commit81d073d5a193f2a07ca8efbb1a337a69c1c6d778 (patch)
treecdd09f636a674e7eb94f194d0fea7af6e9a596d5 /script/update/project/repo
parenteae173ec134809966cd962c1a3c0333583306a11 (diff)
update/project/*: unified git reset handling
With this change, lbmk now also updates submodules on simple git clones, not just multi-tree clones. This is OK, because git does not return non-zero status when git submodule update is ran, where git submodules are not actually defined. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script/update/project/repo')
-rwxr-xr-xscript/update/project/repo7
1 files changed, 2 insertions, 5 deletions
diff --git a/script/update/project/repo b/script/update/project/repo
index d6eb3130..7e65ef29 100755
--- a/script/update/project/repo
+++ b/script/update/project/repo
@@ -79,11 +79,8 @@ clone_project()
git clone ${url} "${tmp_dir}" || git clone ${bkup_url} "${tmp_dir}" || \
fail "clone_project: could not download ${name}"
- (
- cd "${tmp_dir}" || fail "clone_project: tmpdir not created"
- git reset --hard ${revision} || \
- fail "clone_project: Cannot reset revision"
- )
+ git_reset_rev "${tmp_dir}" "${revision}" "fail" || \
+ fail "clone_project ${location}/: cannot reset <- ${revision}"
git_am_patches "${tmp_dir}" "${PWD}/config/${name}/patches" "fail" || \
fail "clone_project ${location}/: cannot apply patches"