[Android] buildsystem: simplify load_progress in check-all-commits.sh

Nicolas Pomepuy git at videolan.org
Mon Sep 7 08:38:50 UTC 2026


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Jul 29 11:34:55 2026 +0200| [d4a1ab0b84d26e2cd105930af4ad405b88f98a17] | committer: Duncan McNamara

buildsystem: simplify load_progress in check-all-commits.sh

Remove support for legacy and intermediate progress file formats.

> https://code.videolan.org/videolan/vlc-android/commit/d4a1ab0b84d26e2cd105930af4ad405b88f98a17
---

 buildsystem/check-all-commits.sh | 45 +++++++++-------------------------------
 1 file changed, 10 insertions(+), 35 deletions(-)

diff --git a/buildsystem/check-all-commits.sh b/buildsystem/check-all-commits.sh
index f46140e027..3a09c93050 100755
--- a/buildsystem/check-all-commits.sh
+++ b/buildsystem/check-all-commits.sh
@@ -82,44 +82,19 @@ UI_HEIGHT=24
 # --- State Management ---
 
 # load_progress: Reads rebase statistics from the disk.
-# Handles three generations of file formats for seamless upgrades.
 load_progress() {
     if [ -f "$PROGRESS_FILE" ]; then
-        local line=$(cat "$PROGRESS_FILE")
-        local count=$(echo "$line" | wc -w)
-
-        if [ "$count" -eq 5 ]; then
-            # Legacy format (pre-refactor)
-            read -r CURRENT TOTAL TOTAL_SUCCESS_DURATION LONGEST SHORTEST < "$PROGRESS_FILE"
-            SUCCESS_COUNT=$((CURRENT > 0 ? CURRENT - 1 : 0))
-            BASE_REF="N/A"
-        elif [ "$count" -eq 6 ]; then
-            # Intermediate format
-            read -r CURRENT TOTAL SUCCESS_COUNT TOTAL_SUCCESS_DURATION LONGEST SHORTEST < "$PROGRESS_FILE"
-            BASE_REF="N/A"
-        else
-            # Modern format with full context
-            read -r CURRENT TOTAL SUCCESS_COUNT TOTAL_SUCCESS_DURATION LONGEST SHORTEST BASE_REF _ < "$PROGRESS_FILE"
-        fi
-
-        # Apply robust defaults if any field is missing or invalid.
-        CURRENT=${CURRENT:-0}
-        TOTAL=${TOTAL:-0}
-        SUCCESS_COUNT=${SUCCESS_COUNT:-0}
-        TOTAL_SUCCESS_DURATION=${TOTAL_SUCCESS_DURATION:-0}
-        LONGEST=${LONGEST:-0}
-        SHORTEST=${SHORTEST:-999999}
-        BASE_REF=${BASE_REF:-"N/A"}
-    else
-        # Initialize fresh state
-        CURRENT=0
-        TOTAL=0
-        SUCCESS_COUNT=0
-        TOTAL_SUCCESS_DURATION=0
-        LONGEST=0
-        SHORTEST=999999
-        BASE_REF="N/A"
+        read -r CURRENT TOTAL SUCCESS_COUNT TOTAL_SUCCESS_DURATION LONGEST SHORTEST BASE_REF _ < "$PROGRESS_FILE"
     fi
+
+    # Apply robust defaults if any field is missing or invalid.
+    CURRENT=${CURRENT:-0}
+    TOTAL=${TOTAL:-0}
+    SUCCESS_COUNT=${SUCCESS_COUNT:-0}
+    TOTAL_SUCCESS_DURATION=${TOTAL_SUCCESS_DURATION:-0}
+    LONGEST=${LONGEST:-0}
+    SHORTEST=${SHORTEST:-999999}
+    BASE_REF=${BASE_REF:-"N/A"}
 }
 
 # save_progress: Writes current stats to disk so they survive across 'git rebase' iterations.



More information about the Android mailing list