lint/fixes
authorShane Jaroch <chown_tee@proton.me>
Sat, 17 Jan 2026 06:38:39 +0000 (01:38 -0500)
committerShane Jaroch <chown_tee@proton.me>
Sat, 17 Jan 2026 06:38:39 +0000 (01:38 -0500)
completions/gen_docs.sh
tests/manual_test_clean_local.sh

index 55b83b33010429806e9018ea602cce9afba76549..d73b41b1ee6357fdfb691d59e17af2ecc53cf475 100755 (executable)
@@ -57,9 +57,8 @@ CLEAN_FLAGS_RAW=$(echo "$RAW_HELP" | grep "^    clean -" | awk '{
 CLEAN_FLAGS_BASH=$(echo "$CLEAN_FLAGS_RAW" | tr '\n' ' ' | sed 's/  */ /g; s/ $//')
 
 # For Zsh: Generate proper spec strings
-CLEAN_FLAGS_ZSH=""
 # Use while read loop to handle lines safely
-echo "$CLEAN_FLAGS_RAW" | while read -r line; do
+CLEAN_FLAGS_ZSH=$(echo "$CLEAN_FLAGS_RAW" | while read -r line; do
        [ -z "$line" ] && continue
        # line is "-f --force" or "--hard"
        # simple split
@@ -93,15 +92,12 @@ echo "$CLEAN_FLAGS_RAW" | while read -r line; do
        else
                printf " %s'%s'" "$fspec" "$desc"
        fi
-done >.zsh_flags_tmp
-CLEAN_FLAGS_ZSH=$(cat .zsh_flags_tmp)
-rm .zsh_flags_tmp
+done | tr '\n' ' ')
 
 # For Fish
 # We need to turn "-f --force" into: -s f -l force
 # And "--hard" into: -l hard
-CLEAN_FLAGS_FISH=""
-echo "$CLEAN_FLAGS_RAW" | while read -r line; do
+CLEAN_FLAGS_FISH=$(echo "$CLEAN_FLAGS_RAW" | while read -r line; do
        [ -z "$line" ] && continue
 
        short=""
@@ -139,9 +135,7 @@ echo "$CLEAN_FLAGS_RAW" | while read -r line; do
        cmd="$cmd -d 'Flag';"
 
        printf "%s\n" "$cmd"
-done >.fish_tmp
-CLEAN_FLAGS_FISH=$(cat .fish_tmp)
-rm .fish_tmp
+done)
 
 # 3. Generate README
 echo "Generating $README_OUT..."
index 2e37140a0e58584060ac3c0ef214919ddc5fc0af..4328bc68c988388b9bfb52f386ac14f69d3aebad 100755 (executable)
@@ -1,5 +1,7 @@
 #!/bin/sh
 set -e
+export GIT_CONFIG_GLOBAL=/dev/null
+export GIT_CONFIG_SYSTEM=/dev/null
 
 # Setup test environment
 echo "Setting up test environment..."
@@ -17,7 +19,7 @@ mkdir -p "$REMOTE_DIR"
 
 # Initialize repo
 cd "$REPO_DIR"
-git init
+git -c init.defaultBranch=master init
 git config user.email "you@example.com"
 git config user.name "Your Name"
 
@@ -64,7 +66,7 @@ gpg --batch --passphrase "" --quick-generate-key "Test <test@test.com>"
 
 # Initialize REMOTE_DIR as a bare git repo so gcrypt treats it as a git backend (gitception)
 # This is required to trigger gitception_remove
-git init --bare "$REMOTE_DIR"
+git -c init.defaultBranch=master init --bare "$REMOTE_DIR"
 
 # Configure remote
 git remote add origin "gcrypt::$REMOTE_DIR"
@@ -77,8 +79,9 @@ git config advice.defaultBranchName false
 export PATH="$PROJECT_ROOT:$PATH"
 
 echo "Pushing to remote..."
-# Explicitly use +master to ensure 'force' is detected by gcrypt to allow init
-git push origin +master
+# Explicitly use +HEAD:master to ensure 'force' is detected by gcrypt.
+# Using HEAD:master ensures we push whatever branch 'git init' created (main/master) to 'master' on remote.
+git push origin +HEAD:master
 
 # Create garbage on remote
 cd "$TEST_DIR"
@@ -86,10 +89,14 @@ git clone "$REMOTE_DIR" raw_remote_clone
 cd raw_remote_clone
 git checkout master || git checkout -b master
 
+# Add multiple garbage files
 # Add multiple garbage files
 echo "garbage 1" >garbage1.txt
 echo "garbage 2" >garbage2.txt
 git add garbage1.txt garbage2.txt
+# Configure identity for this clone to avoid global config interference
+git config user.email "garbage@maker.com"
+git config user.name "Garbage Maker"
 git commit -m "Add garbage files"
 git push origin master