vmware-archive / clarity

Clarity is a scalable, accessible, customizable, open source design system built with web components. Works with any JavaScript framework, built for enterprises, and designed to be inclusive.
http://clarity.design
MIT License
6.43k stars 763 forks source link

only commit staged files (core) #6544

Closed steve-haar closed 2 years ago

steve-haar commented 2 years ago

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

What is the current behavior?

Currently, the update-license.js script will commit all modified files even if they are not staged. This is because the git diff command ends with a new line which is treated as an empty string and is interpreted as the entire directory.

Issue Number: N/A

What is the new behavior?

This PR makes it so that only staged changes would be committed.

Does this PR introduce a breaking change?

Other information

I wasn't expecting this behavior and it took me a bit to track down. I did see comments to stash and pop untracked changes. If this is a feature and desired behavior, then I would suggest maybe we move it to a different script file so the behavior can be more easily identified.

vmwclabot commented 2 years ago

@steve-haar, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding Signed-off-by: John Doe <john.doe@email.org> to the last line of each Git commit message. The e-mail address used to sign must match the e-mail address of the Git author. Click here to view the Developer Certificate of Origin agreement.