diff options
author | EuAndreh <eu@euandre.org> | 2022-10-27 22:52:29 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2022-10-27 22:52:29 -0300 |
commit | da5c2c6486850e7319ff2fca0c876ab86e42ed3a (patch) | |
tree | 21368e5a0cd8d5d8a77a218825d6e4cd8435f0f7 | |
parent | bin/repos: Add documentation for -e option in help string (diff) | |
download | dotfiles-da5c2c6486850e7319ff2fca0c876ab86e42ed3a.tar.gz dotfiles-da5c2c6486850e7319ff2fca0c876ab86e42ed3a.tar.xz |
bin/repos: Add explicit note on intentionally commented code
-rwxr-xr-x | bin/repos | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -67,6 +67,7 @@ array_decode() { # +# CAVEAT: # To avoid needing to keep decoding the array elements on every call to # `arr_includes`, assume directory names don't contain newlines. This makes the # current code scanning ~/dev/ from 8 seconds go to 1 second. @@ -78,14 +79,14 @@ arr_push() { if [ -n "$ARR" ]; then echo "$ARR" fi - echo "$ELT" # | array_encode + echo "$ELT" # | array_encode (see CAVEAT) } arr_includes() { ARR="$1" ELT="$2" echo "$ARR" | while read -r el; do - # if [ "$(printf '%s\n' "$el" | array_decode)" = "$ELT" ]; then + # if [ "$(printf '%s\n' "$el" | array_decode)" = "$ELT" ]; then (see CAVEAT) if [ "$el" = "$ELT" ]; then return 2 fi |