]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mkosi: Fix sync script git command
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 3 Jul 2024 20:18:07 +0000 (22:18 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 3 Jul 2024 20:40:31 +0000 (22:40 +0200)
Let's make sure we actually operate on the packaging git repo.

mkosi.images/system/mkosi.sync

index 517b7c934675793a1db8a1f64ad9e83274bb14d2..d56ddf579068e8a1378266038556ec2fff11ce80 100755 (executable)
@@ -15,7 +15,7 @@ if [[ -d "$PKG_SUBDIR/.git" ]]; then
     fi
 
     # If work is being done on the packaging rules in a separate branch, don't touch the checkout.
-    if ! git merge-base --is-ancestor HEAD "origin/$GIT_BRANCH"; then
+    if ! git -C "$PKG_SUBDIR" merge-base --is-ancestor HEAD "origin/$GIT_BRANCH"; then
         EXIT_STATUS=$?
         if [[ $EXIT_STATUS -eq 1 ]]; then
             exit 0