fixes/lint. tidy up. polish up.
authorShane Jaroch <chown_tee@proton.me>
Sat, 17 Jan 2026 05:17:52 +0000 (00:17 -0500)
committerShane Jaroch <chown_tee@proton.me>
Sat, 17 Jan 2026 05:17:52 +0000 (00:17 -0500)
.github/workflows/lint.yaml
Makefile
completions/gen_docs.sh
tests/broken-test-gc.sh
tests/manual_test_clean_local.sh
tests/system-test-clean-repack.sh
tests/verify-system-install.sh [moved from tests/installer-test-verify.sh with 100% similarity]

index 867acc6b565ce87bb7cf5728e66695e1a4ba7f68..eb63f245ced7659510d973e6d2546ed58310a93f 100644 (file)
@@ -100,8 +100,8 @@ jobs:
       - name: Install dependencies
         run: pkg update && pkg install -y git make
 
-      - name: Run your test script
-        run: ./my-test-script.sh
+      - name: Run verification
+        run: make check/install
 
   # Lint job
   lint:
index 089c93d4c93806a862878850bdcaefed2aa1a53c..f3cb385ca166cd54ae5b5f251e6ce2afdfa31738 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -212,7 +212,7 @@ install/user:       ##H make install prefix=~/.local
 
 .PHONY: check/install
 check/install: ##H Verify installation works
-       bash ./tests/installer-test-verify.sh
+       bash ./tests/verify-system-install.sh
 
 
 .PHONY: uninstall/, uninstall
index 0608a910ff7b91d3f2ce93d91daafa7fc0705d89..a6355002114dee9695a23a7cf3e265379afbb27c 100755 (executable)
@@ -39,12 +39,20 @@ COMMANDS_LIST=$(echo "$RAW_HELP" | awk '/^  [a-z]+ / {print $1}' | grep -vE "^(h
 # Text: "    clean -f, --force    Actually delete files..."
 # We want to extract flags properly.
 # Get lines, then extract words starting with -
+# Stop at the first word that doesn't start with - (description start)
 CLEAN_FLAGS_RAW=$(echo "$RAW_HELP" | grep "^    clean -" | awk '{
        out=""
-       if ($2 ~ /^-/) out=$2
-       if ($3 ~ /^-/) out=out " " $3
+       for (i=2; i<=NF; i++) {
+               if ($i ~ /^-/) {
+                       # remove comma if present
+                       sub(",", "", $i)
+                       out = out ? out " " $i : $i
+               } else {
+                       break
+               }
+       }
        print out
-}' | sed 's/,//g')
+}')
 
 CLEAN_FLAGS_BASH=$(echo "$CLEAN_FLAGS_RAW" | tr '\n' ' ' | sed 's/  */ /g; s/ $//')
 
@@ -56,19 +64,35 @@ echo "$CLEAN_FLAGS_RAW" | while read -r line; do
        # line is "-f --force" or "--hard"
        # simple split
        flags=$(echo "$line" | tr ' ' '\n')
-       # Build exclusion list
-       excl="($line)"
-       # Build flag list
+       # Build exclusion list (all flags in this group exclude each other self, but wait,
+       # usually -f and --force are the same.
+       # The user wants: '(-f --force)'{-f,--force}'[desc]'
+
+       # Check if we have multiple flags (aliases)
        if echo "$line" | grep -q " "; then
-               # multiple flags
-               fspec="{$line}"
-               fspec=$(echo "$fspec" | sed 's/ /,/g')
+               # "(-f --force)"
+               excl="($line)"
+               # "{-f,--force}"
+               fspec="{$(echo "$line" | sed 's/ /,/g')}"
        else
+               # "" (no exclusion needed against itself strictly, or just empty for single)
+               # But usually clean flags are distinct.
+               excl=""
                fspec="$line"
        fi
-       # Description - just generic
+
+       # Description - specific descriptions would be better, but generic for now.
+       # We rely on the fact that these are clean flags.
+       desc="[Flag]"
+
        # Use printf to avoid newline issues in variable
-       printf " '%s'${fspec}'[flag]'" "$excl"
+       # Note: Zsh format is 'exclusion:long:desc' or 'exclusion'flag'desc'
+       # '(-f --force)'{-f,--force}'[Actually delete files]'
+       if [ -n "$excl" ]; then
+               printf " '%s'%s'%s'" "$excl" "$fspec" "$desc"
+       else
+               printf " %s'%s'" "$fspec" "$desc"
+       fi
 done >.zsh_flags_tmp
 CLEAN_FLAGS_ZSH=$(cat .zsh_flags_tmp)
 rm .zsh_flags_tmp
index 1562cf42c40361c4ce373192ac394853ac88560a..cb0d14a8262f093921150f1323c9f4e70c68cd2e 100755 (executable)
@@ -68,7 +68,7 @@ $GIT commit -m "Clean history" >/dev/null
 print_info "Force pushing with GCRYPT_FULL_REPACK=1..."
 export GCRYPT_FULL_REPACK=1
 # We need to force push to overwrite the old master
-if git push --force origin clean-history:master >push.log 2>&1; then
+if $GIT push --force origin clean-history:master >push.log 2>&1; then
        print_success "Push successful"
        cat push.log
 else
index 13100dbaa7c8a199c3bd4e20a73faa0c429f275f..2e37140a0e58584060ac3c0ef214919ddc5fc0af 100755 (executable)
@@ -55,6 +55,8 @@ done
 exec gpg "\${args[@]}"
 EOF
 chmod +x "${GNUPGHOME}/gpg"
+# VIOLATION FIX: Add wrapper to PATH so it's actually used
+export PATH="${GNUPGHOME}:$PATH"
 
 # Generate key
 echo "Generating GPG key..."
@@ -69,8 +71,8 @@ git remote add origin "gcrypt::$REMOTE_DIR"
 git config remote.origin.gcrypt-participants "test@test.com"
 git config remote.origin.gcrypt-signingkey "test@test.com"
 
-# Configure global git for test to avoid advice noise
-git config --global advice.defaultBranchName false
+# Configure local git for test (VIOLATION FIX: Removed --global)
+git config advice.defaultBranchName false
 
 export PATH="$PROJECT_ROOT:$PATH"
 
index acc18530217c8b8eef521352d862931006c5ea96..8491ddc8e33eced0eb484375d7d9798e2a77e717 100755 (executable)
@@ -46,9 +46,9 @@ chmod +x "${GNUPGHOME}/gpg"
 # Git config isolation
 export GIT_CONFIG_SYSTEM=/dev/null
 export GIT_CONFIG_GLOBAL="$TEST_DIR/gitconfig"
-git config --global user.email "test@test.com"
-git config --global user.name "Test"
-git config --global init.defaultBranch "master"
+git config user.email "test@test.com"
+git config user.name "Test"
+git config init.defaultBranch "master"
 
 echo "Generating GPG key..."
 gpg --batch --passphrase "" --quick-generate-key "Test <test@test.com>"