From 397a40f648dc97a04e9dcf08795d5c44fc818668 Mon Sep 17 00:00:00 2001 From: zenggang Date: Tue, 14 Feb 2023 02:19:03 +0000 Subject: [PATCH] * Fix bug#32099 --- module/git/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/git/model.php b/module/git/model.php index c5805ac70e..7dcd7b9f17 100644 --- a/module/git/model.php +++ b/module/git/model.php @@ -159,13 +159,13 @@ class gitModel extends model $lastInDB = $this->repo->getLatestCommit($repo->id); /* Ignore unsynced branch. */ - if(empty($lastInDB)) + if($repo->synced != 1) { if($printLog) $this->printLog("Please init repo {$repo->name}"); continue; } - $version = (int)$lastInDB->commit + 1; + $version = isset($lastInDB->commit) ? (int)$lastInDB->commit + 1 : 1; $logs = $this->repo->getUnsyncedCommits($repo); $objects = array(); if(!empty($logs))