summaryrefslogtreecommitdiffstats
path: root/mkosi.images/build/mkosi.sync
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-16 18:27:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-16 18:27:56 +0000
commit26fde72265073b26498ce55596c0eda1bc3113b4 (patch)
tree580247f9ae59f3bb05e3b9ee52eb4fe51b63887b /mkosi.images/build/mkosi.sync
parentAdding upstream version 256.5. (diff)
downloadsystemd-upstream.tar.xz
systemd-upstream.zip
Adding upstream version 256.6.upstream/256.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xmkosi.images/build/mkosi.sync2
1 files changed, 1 insertions, 1 deletions
diff --git a/mkosi.images/build/mkosi.sync b/mkosi.images/build/mkosi.sync
index febe893..4cb2b41 100755
--- a/mkosi.images/build/mkosi.sync
+++ b/mkosi.images/build/mkosi.sync
@@ -43,7 +43,7 @@ if [[ ! -e "pkg/$PKG_SUBDIR" ]] || [[ -z "$(ls --almost-all "pkg/$PKG_SUBDIR")"
# --no-cone is needed to check out only one top-level directory
git -C "pkg/$PKG_SUBDIR" sparse-checkout set --no-cone "${GIT_SUBDIR:-}"
fi
-else
+elif ! git -C "pkg/$PKG_SUBDIR" cat-file -e "$GIT_COMMIT^{commit}"; then
git -C "pkg/$PKG_SUBDIR" remote set-url origin "$GIT_URL"
git -C "pkg/$PKG_SUBDIR" fetch origin "$GIT_BRANCH"
fi