From: Shane Date: Mon, 26 Jan 2026 06:05:05 +0000 (+0000) Subject: fix clean to handle general paths X-Git-Url: https://git.nutra.tk/v1?a=commitdiff_plain;h=7170a0e03c5728dfb852b85557c466d5e50b17fc;p=gamesguru%2Fgit-remote-gcrypt.git fix clean to handle general paths --- diff --git a/README.rst b/README.rst index dad1741..e9dcabd 100644 --- a/README.rst +++ b/README.rst @@ -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 ============ diff --git a/git-remote-gcrypt b/git-remote-gcrypt index b438669..6fc12b5 100755 --- a/git-remote-gcrypt +++ b/git-remote-gcrypt @@ -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 } diff --git a/tests/test-safety-check-repro.sh b/tests/test-safety-check-repro.sh index 2fb8f5c..d807950 100755 --- a/tests/test-safety-check-repro.sh +++ b/tests/test-safety-check-repro.sh @@ -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 " -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..."