From: Shane Jaroch Date: Thu, 8 Jan 2026 23:34:28 +0000 (-0500) Subject: clean URLs filtered specially for rsync:// protocol X-Git-Url: https://git.nutra.tk/v1?a=commitdiff_plain;h=b5ef010fbefee960f68ba263ad33579b3fc6e1e6;p=gamesguru%2Fgit-remote-gcrypt.git clean URLs filtered specially for rsync:// protocol --- diff --git a/git-remote-gcrypt b/git-remote-gcrypt index 69c23cc..a667678 100755 --- a/git-remote-gcrypt +++ b/git-remote-gcrypt @@ -1355,10 +1355,16 @@ elif [ "$NAME" = "gcrypt-clean" ]; then if ! ensure_connected; then echo_die "Could not connect to $URL." fi - + # Get all files in the remote - remote_files=$(git ls-tree --name-only "$Gref" 2>/dev/null || :) - + # For rsync backends, list files directly via rsync --list-only (awk extracts filename). + # For git backends, list files from the gcrypt branch tree. + if isurl rsync "$URL"; then + remote_files=$(rsync --no-motd --list-only "$(rsynclocation "$URL")/" | awk '{print $NF}' | grep -vE '^\.$|^\.\.$' || :) + else + remote_files=$(git ls-tree --name-only "$Gref" 2>/dev/null || :) + fi + if isnull "$remote_files"; then echo_info "Remote is empty. Nothing to clean." CLEAN_FINAL "$URL"