Closed steve-haar closed 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.
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 thegit 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.