Skip to content

Conversation

@shbhmexe
Copy link
Contributor

@shbhmexe shbhmexe commented Nov 28, 2025

Summary

This PR makes focused, low-risk improvements to shell scripts without changing any existing features:

  • Use "$@" instead of $* where scripts iterate over or execute user-supplied arguments, preserving spaces and special characters.
  • Add safer quoting in git-lfs-diff.sh when reading Git LFS pointers and computing object paths.

Updated files:

  • devel/execute_on_all_databases.sh
  • devel/execute_on_all_databases_k8s.sh
  • devel/mass_update.sh
  • util_sh/monitor_command.sh
  • git-lfs-diff.sh

Reasoning

  • collapses all parameters into a single word separated by the first character of IFS, which breaks when arguments include spaces or glob characters. "$@" preserves each original argument.
  • Quoting variable expansions and the revision:path argument in git-lfs-diff.sh prevents word-splitting and path parsing issues for file names with spaces.

Impact

  • Improves correctness and stability when scripts are invoked with multiple arguments and file names containing spaces.
  • No behavioral changes beyond safer argument handling. Default flows and outputs are preserved.

Verification

  • Changes are POSIX-compatible for /bin/sh scripts and compatible with /bin/bash for bash scripts.
  • The diff is limited to argument iteration/execution lines and quoting; no logic was altered.

Applied go fmt to all Go files in the repository to ensure
consistent code formatting.

Signed-off-by: shbhmexe <shubhushukla586@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant