]> Nutra Git (v2) - gamesguru/git-remote-gcrypt.git/commitdiff
fix clean to handle general paths
authorShane <chown_tee@proton.me>
Mon, 26 Jan 2026 06:05:05 +0000 (06:05 +0000)
committerShane <chown_tee@proton.me>
Mon, 26 Jan 2026 06:05:05 +0000 (06:05 +0000)
README.rst
git-remote-gcrypt
tests/test-safety-check-repro.sh

index dad174115557340ce68900427f7218c33916a80a..e9dcabd40e1cc1b401f41ec812f6cce15a2b20d8 100644 (file)
@@ -317,18 +317,6 @@ unencrypted files, you must use the ``--force`` flag::
 
     git-remote-gcrypt clean url --force
 
-
-Stats for gcrypt repos
-======================
-
-To show diagnostics for a remote gcrypt repo, use::
-
-    git-remote-gcrypt stat [url|remote]
-
-This command will list the total number of files on the remote, and if
-a valid gcrypt repository is detected, it will also show the number of
-tracked (encrypted) files versus untracked (plain) files.
-
 Known issues
 ============
 
index b43866975cdc76701c8f1c4b4d3612957e537565..6fc12b53929a4a3360292e0ea785ca03c249f882 100755 (executable)
@@ -363,7 +363,7 @@ gitception_get()
                command mv -f "$fet_head" "$fet_head.$$~" || :
        fi
        if git fetch -q -f "$1" "$Gref_rbranch:$Gref-fetch" >/dev/null; then
-               obj_id="$(git ls-tree "$Gref-fetch" | xgrep -E '\b'"$2"'$' | awk '{print $3}')"
+               obj_id="$(git -c core.quotePath=false ls-tree "$Gref-fetch" | xgrep -E '\b'"$2"'$' | awk '{print $3}')"
                if isnonnull "$obj_id" && git cat-file blob "$obj_id"; then
                        ret_=:
                else
@@ -845,7 +845,7 @@ early_safety_check()
                return 0
        fi
 
-       check_files=$(git ls-tree --name-only "refs/gcrypt/safety-check" 2>/dev/null || :)
+       check_files=$(git -c core.quotePath=false ls-tree --name-only "refs/gcrypt/safety-check" 2>/dev/null || :)
        git update-ref -d "refs/gcrypt/safety-check" 2>/dev/null || true
 
        if isnull "$check_files"; then
@@ -1232,7 +1232,7 @@ check_safety()
        fi
        
        # Get all files in the remote
-       remote_files=$(git ls-tree --name-only "$Gref" 2>/dev/null || :)
+       remote_files=$(git -c core.quotePath=false ls-tree --name-only "$Gref" 2>/dev/null || :)
        
        # If no files, nothing to check
        isnonnull "$remote_files" || return 0
@@ -1502,7 +1502,7 @@ 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") || {
+                       r_files=$(git -c core.quotePath=false ls-tree -r --name-only "refs/gcrypt/list-files") || {
                                git update-ref -d "refs/gcrypt/list-files"
                                return 1
                        }
index 2fb8f5c7dc56fd0323a367f9b32cb028018bcfb9..d80795012175b53c09d7b0df4a33020a1bd1a8cd 100755 (executable)
@@ -36,7 +36,6 @@ GIT="git -c advice.defaultBranchName=false -c commit.gpgSign=false -c init.defau
 
 # Generate key
 gpg --batch --passphrase "" --quick-generate-key "Test <test@test.com>"
-KEYID=$(gpg --list-keys --with-colons "test@test.com" | awk -F: '/^pub:/ { print $5 }')
 
 # 1. Init bare repo as "remote" (creates HEAD, config, description, etc)
 print_info "Initializing 'remote' as standard bare repo..."