Skip to content

Conversation

@clydin
Copy link
Member

@clydin clydin commented Dec 16, 2025

All git commands now use execFileSync instead of execSync to prevent shell injection vulnerabilities and provide more predictable execution. checkCleanGit now utilizes git status --porcelain -z for NUL-terminated output, ensuring correct handling of filenames with spaces or special characters, and preventing potential path trimming bugs. An execGit helper function was introduced to reduce code duplication and standardize git command execution options. hasChangesToCommit now gracefully handles non-Git repositories by returning false instead of throwing.

All `git` commands now use `execFileSync` instead of `execSync` to prevent shell injection vulnerabilities and provide more predictable execution.
`checkCleanGit` now utilizes `git status --porcelain -z` for NUL-terminated output, ensuring correct handling of filenames with spaces or special characters, and preventing potential path trimming bugs.
An `execGit` helper function was introduced to reduce code duplication and standardize `git` command execution options.
`hasChangesToCommit` now gracefully handles non-Git repositories by returning `false` instead of throwing.
@clydin clydin force-pushed the cli/update-git-helpers branch from 0578dfe to 7ecaef7 Compare December 16, 2025 00:31
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release labels Dec 16, 2025
@clydin clydin merged commit b103f3b into angular:main Dec 16, 2025
36 checks passed
@clydin
Copy link
Member Author

clydin commented Dec 16, 2025

This PR was merged into the repository. The changes were merged into the following branches:

@clydin clydin deleted the cli/update-git-helpers branch December 16, 2025 14:01
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jan 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: @angular/cli target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants