mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-12 06:22:56 +02:00
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>
This commit is contained in:
@@ -143,13 +143,9 @@ prepare_new_tree()
|
||||
|
||||
cp -R "${project}/${project}" "${project}/${tree}" || \
|
||||
err "${project}/${tree}: cannot copy source tree"
|
||||
(
|
||||
cd "${project}/${tree}" || err "cannot cd to ${project}/${tree}"
|
||||
git reset --hard ${rev} || \
|
||||
err "cannot reset ${project} revision for tree, ${tree}"
|
||||
git submodule update --init --checkout || \
|
||||
err "cannot update ${project} submodules for tree, ${tree}"
|
||||
)
|
||||
git_reset_rev "${project}/${tree}" "${rev}" "err" || \
|
||||
err "prepare_new_trees ${project}/${tree}: cannot reset <- ${rev}"
|
||||
|
||||
git_am_patches "${PWD}/${project}/${tree}" \
|
||||
"${PWD}/${cfgsdir}/${tree}/patches" "err" || \
|
||||
err "prepare_new_trees ${project}/${tree}: cannot apply patches"
|
||||
|
||||
Reference in New Issue
Block a user