lint
authorShane Jaroch <chown_tee@proton.me>
Wed, 14 Jan 2026 19:49:53 +0000 (14:49 -0500)
committerShane Jaroch <chown_tee@proton.me>
Wed, 14 Jan 2026 19:49:53 +0000 (14:49 -0500)
Makefile
TODO.rst [deleted file]
git-remote-gcrypt
tests/test_rsync_simple.sh
utils/gen_docs.sh

index 1bb405eb5093f97b3c014d5d67cda62c4bdf0d4b..f060776a147e0eba1204917a601027afd5d31ffc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -101,7 +101,7 @@ test/:      ##H Run tests (purity checks only if kcov missing)
        @if command -v kcov >/dev/null 2>&1; then \
                $(MAKE) test/installer test/system test/cov; \
        else \
-               printf "\033[1;33mkcov not found: skipping coverage/bash tests.\033[0m\n"; \
+               $(call print_warn,kcov not found: skipping coverage/bash tests.); \
                $(MAKE) test/purity; \
        fi
 
diff --git a/TODO.rst b/TODO.rst
deleted file mode 100644 (file)
index d1afd10..0000000
--- a/TODO.rst
+++ /dev/null
@@ -1,37 +0,0 @@
-
-Saturday, 1/10/26
-
-Q: Does the manifest... (contain? <incomplete>)
-
-~~~~~~~~~~~~~~~~~~~~~~
-
-The issue here is the second one is a valid, encrypted remote.
-The tool is doing too much work and providing dumb results, at times, by trying to be fancy and smart.
-
-.. code-block:: shell
-
-    shane@coffeelake:~/repos/git-remote-gcrypt$ cd -
-    /home/shane
-    direnv: loading ~/.envrc
-    direnv: export +RIPGREP_CONFIG_PATH +VIRTUAL_ENV +VIRTUAL_ENV_PROMPT ~PATH
-    shane@coffeelake:~$ git remote update
-    Fetching github
-    gcrypt: git-remote-gcrypt version 1.5-10-ge258c9e (deb running on arch)
-    gcrypt: ERROR: Remote repository contains unencrypted or unknown files!
-    gcrypt: To protect your privacy, git-remote-gcrypt will NOT push to this remote.
-    gcrypt: Found unexpected files: .bash_aliases .bash_exports .bash_history.coffeelake
-    gcrypt: To see unencrypted files, use: git-remote-gcrypt clean git@github.com:gamesguru/shane.git
-    gcrypt: To fix and remove these files, use: git-remote-gcrypt clean --force git@github.com:gamesguru/shane.git
-    error: could not fetch github
-
-    # This shouldn't warn, it's a valid encrypted remote!
-    Fetching origin
-    gcrypt: git-remote-gcrypt version 1.5-10-ge258c9e (deb running on arch)
-    gcrypt: ERROR: Remote repository is not empty!
-    gcrypt: To protect your privacy, git-remote-gcrypt will NOT push to this remote
-    gcrypt: unless you force it or clean it.
-    gcrypt: Found files: 91bd0c092128cf2e60e1a608c31e92caf1f9c1595f83f2890ef17c0e4881aa0a b5cb4d58020a8b6376ce627e3c4d2404a1e5bb772bd20eecedbe3ff9212d9aae ...
-    gcrypt: To see files: git-remote-gcrypt clean rsync://git@dev:repos/home.shane.git
-    gcrypt: To init anyway (DANGEROUS if not empty): git push --force ...
-    gcrypt: OR set gcrypt.allow-unencrypted-remote to true.
-    error: could not fetch origin
index 05b66438e726d2d4b8010d8d41936807a93a4715..4a9213c46c0d4f0adf06647aa23b503482ddd5f3 100755 (executable)
@@ -1414,7 +1414,10 @@ get_remote_file_list()
                # Try fetching master and main to a temporary ref.
                if git fetch --quiet "$URL" "refs/heads/master:refs/gcrypt/list-files" 2>/dev/null || \
                   git fetch --quiet "$URL" "refs/heads/main:refs/gcrypt/list-files" 2>/dev/null; then
-                       r_files=$(git ls-tree -r --name-only "refs/gcrypt/list-files") || return 1
+                       r_files=$(git ls-tree -r --name-only "refs/gcrypt/list-files") || {
+                               git update-ref -d "refs/gcrypt/list-files"
+                               return 1
+                       }
                        git update-ref -d "refs/gcrypt/list-files"
                else
                        # Could not fetch, or remote is empty.
index c6e1d340a9e39af3e3289b7db1fab1b1cfd6bd1b..eeafc325bd6b700d19044abcb48987ea62e47c34 100644 (file)
@@ -28,12 +28,14 @@ EOF
 echo "Checking results..."
 if [ -e .tmp/simple_dst/subdir/badfile ]; then
        echo "FAIL: badfile NOT removed"
+       exit 1
 else
        echo "SUCCESS: badfile removed"
 fi
 
 if [ ! -e .tmp/simple_dst/subdir/goodfile ]; then
        echo "FAIL: goodfile was INCORRECTLY removed"
+       exit 1
 else
        echo "SUCCESS: goodfile preserved"
 fi
index eab2ba7673ad164c47e1ec905f77cfbd2aadd02a..b95bbafaf5bfec71a47fadb91edeb484c11b4c5d 100755 (executable)
@@ -73,7 +73,7 @@ unset IFS
 
 # 3. Generate README
 echo "Generating $README_OUT..."
-sed "s/{commands_help}/$(echo "$COMMANDS_HELP" | sed 's/[\/&]/\\&/g' | awk '{printf "%s\\n", $0}')/" "$README_TMPL" >"$README_OUT"
+sed "s/{commands_help}/$(echo "$COMMANDS_HELP" | sed 's/[\/&]/\\&/g' | awk 'NR>1{printf "\\n"} {printf "%s", $0}')/" "$README_TMPL" >"$README_OUT"
 
 # 4. Generate Bash
 echo "Generating Bash completions..."