rehash: drop redundant sort -u from make_shims call (#3410)

register_shim() already deduplicates via associative array (bash 4+) or
by checking if a shim already exists (bash 3.2). The sort -u pipe in the make_shims
call is thus redundant -- the dedup happens downstream regardless. Shim
creation is order-independent and idempotent, so sorting has no semantic
effect either.

Saves one subprocess fork during every rehash invocation.
This commit is contained in:
Jake Lodwick 2026-03-01 14:36:24 -07:00 committed by GitHub
parent 43e83b52a2
commit 47871b2dc3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -196,7 +196,7 @@ shopt -s nullglob
create_prototype_shim create_prototype_shim
remove_outdated_shims remove_outdated_shims
# shellcheck disable=SC2046 # shellcheck disable=SC2046
make_shims $(list_executable_names | sort -u) make_shims $(list_executable_names)
# Allow plugins to register shims. # Allow plugins to register shims.