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:
34
yadm
34
yadm
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user