]> Git [git.vados.ru] :: Repos - Mikrotiks/ros.vados.ru.git/commitdiff
Autocommit in repo: ros.vados.ru, generated by owner: root, in 03:08:02 12.03.2026.
authorvados-dev <192440777+vados-dev@users.noreply.github.com>
Thu, 12 Mar 2026 00:08:05 +0000 (03:08 +0300)
committervados-dev <192440777+vados-dev@users.noreply.github.com>
Thu, 12 Mar 2026 00:08:05 +0000 (03:08 +0300)
bin/check_repo.sh
html/AM-GlobalFunc.rsc

index b49fb807446b13be8225b00c453545c906303faf..2f6072817581846c6bb2574bcb89c472c7a4eaea 100755 (executable)
@@ -2,21 +2,21 @@
 
 cd "${REPO_DIR:-.}"
 
-dirty="$(git status --porcelain || true)"
-diff="$(git diff --quiet && git diff --cached --quiet || true)"
+dirty="$(git ls-files -u || true)"
 lsfiles="$(git ls-files --others --exclude-standard || true)"
 
-if [[ -n "$diff" && -n "$lsfiles" ]]; then
-    echo "[check_repo] repo diff, go to proclean check."
-    if [[ -n "$dirty" ]]; then
-        echo "[check_repo] repo dirty, stop"
-        bash scripts/notify_telegram.sh "STOP: repo dirty in $(pwd)"
-        exit 1
-    else
-        echo "[check_repo] repo clean"
-        exit 1
-    fi
+# Conflict or unresolved state: stop and notify.
+if [[ -n "$dirty" ]] || git diff --check --quiet; then
+    echo "[check_repo] repo has conflicts, stop"
+    bash bin/notify_telegram.sh "STOP: repo conflicts in $(pwd)"
+    exit 1
+fi
+
+# Exit 0 only when repo is NOT clean to allow autocommit flow.
+if git diff --quiet && git diff --cached --quiet && [[ -z "$lsfiles" ]]; then
+    echo "[check_repo] repo clean. Exit 1 from check_repo.sh."
+    exit 1
 else
-    echo "[check_repo] not clean. Exit 0 from check_repo.sh."
+    echo "[check_repo] repo not clean. Exit 0 from check_repo.sh."
     exit 0
 fi
index bbfc72a023a8768836bead03cb4aad98f92eaa62..b8f1ab7c866c92f77fc3ae7dc605476f0a8e147a 100644 (file)
@@ -16,9 +16,9 @@
 :global GlobalFuncReady false;
 
 # Git commit id & info, expected configuration version
-:global CommitId "main/146/a3dba1c2";
+:global CommitId "main/147/46017c6f";
 :global CommitTAG "unknown";
-:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 03:02:05 12.03.2026.";
+:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 03:08:05 12.03.2026.";
 
 # The variables are received right here.
 :global GlobalConfVersion 138;