Handle nested subvolumes & remove broken git exclusion
All checks were successful
ShellCheck / shellcheck (push) Successful in 5s
Docker / build (push) Successful in 18s

This commit is contained in:
Andras Schmelczer 2026-09-27 14:58:14 +01:00
commit 88aed211de

View file

@ -2,6 +2,27 @@
export BORG_RSH='ssh -oBatchMode=yes'
# Borg expands placeholders in both names and archive filters. Only the filter
# needs glob escaping; user-supplied prefixes are literal in both places.
borg_literal_prefix() {
local mode=$1 prefix=$2 character index
for ((index = 0; index < ${#prefix}; index++)); do
character=${prefix:index:1}
case "$character" in
'{') printf '{{' ;;
'}') printf '}}' ;;
'['|'?'|'*')
if [[ $mode == glob ]]; then
printf '[%s]' "$character"
else
printf '%s' "$character"
fi
;;
*) printf '%s' "$character" ;;
esac
done
}
# Never break another client's repository/cache lock. Borg 1.4 only accepts
# finite waits, so retry lock timeouts forever; other errors must propagate.
borg_wait() {