diff --git a/noir-projects/precommit.sh b/noir-projects/precommit.sh index 98efe0a1446..59e2173f700 100755 --- a/noir-projects/precommit.sh +++ b/noir-projects/precommit.sh @@ -34,6 +34,11 @@ if [[ -n "$staged_nr_files" ]]; then done echo "Formatting completed." + + # Re-stage formatted .nr files + echo "Re-staging formatted .nr files..." + repo_root=$(git rev-parse --show-toplevel) + echo "$staged_nr_files" | xargs -I {} git add "$repo_root/{}" fi # We just don't say anything if there are no staged nr files, because no one cares. \ No newline at end of file