1
0
mirror of https://github.com/TheLocehiliosan/yadm synced 2026-03-02 03:49:29 +00:00

Remove reporting of invalid alts

This commit is contained in:
Tim Byrne
2020-11-25 23:07:49 -06:00
parent 62a86ecd27
commit 13a3cdc8a8
3 changed files with 0 additions and 84 deletions

34
yadm
View File

@@ -62,7 +62,6 @@ GPG_OPTS=()
OPENSSL_OPTS=()
LEGACY_WARNING_ISSUED=0
INVALID_ALT=()
# flag causing path translations with cygpath
USE_CYGPATH=0
@@ -232,7 +231,6 @@ function score_file() {
return 0
# unsupported values
else
INVALID_ALT+=("$src")
score=0
return
fi
@@ -545,41 +543,9 @@ function alt() {
alt_linking
remove_stale_links
report_invalid_alts
}
function report_invalid_alts() {
[ "$LEGACY_WARNING_ISSUED" = "1" ] && return
[ "${#INVALID_ALT[@]}" = "0" ] && return
local path_list
for invalid in "${INVALID_ALT[@]}"; do
path_list="$path_list * $invalid"$'\n'
done
cat <<EOF
**WARNING**
Invalid alternates have been detected.
Beginning with version 2.0.0, yadm uses a new naming convention for alternate
files. Read more about this change here:
https://yadm.io/docs/upgrade_from_1
Or to learn more about alternates in general, read:
https://yadm.io/docs/alternates
To rename the invalid alternates run:
yadm mv <old name> <new name>
Invalid alternates detected:
${path_list}
***********
EOF
}
function remove_stale_links() {
# review alternate candidates for stale links
# if a possible alt IS linked, but it's source is not part of alt_linked,