New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show warning when git commit input box only contains whitespaces #45254

Merged
merged 1 commit into from Jun 4, 2018

Conversation

Projects
None yet
2 participants
@gnijuohz
Contributor

gnijuohz commented Mar 8, 2018

fixes #45031.
A warning message 'Current commit message only contains line breaks' will be shown when git.inputValidation is not set to 'off' and all the user has entered in the commit message box are line breaks.

@kieferrm kieferrm requested a review from joaomoreno Mar 8, 2018

@joaomoreno joaomoreno added this to the Backlog milestone Mar 8, 2018

@joaomoreno joaomoreno added the git label Mar 8, 2018

@gnijuohz

This comment has been minimized.

Contributor

gnijuohz commented Mar 12, 2018

@joaomoreno after submitting this PR, I realized even though the issue was about line breaks but other white space characters may apply here too. For example, a mix of line breaks and empty spaces...

My current approach is to see if the commit message is all line breaks (using \r?\n), do you think matching whitespaces (\s) instead is a better approach?

@joaomoreno

This comment has been minimized.

Member

joaomoreno commented Mar 14, 2018

@gnijuohz Yeah I think whitespace makes more sense.

@gnijuohz

This comment has been minimized.

Contributor

gnijuohz commented Mar 14, 2018

@joaomoreno thanks! I'll update my PR.

@gnijuohz gnijuohz changed the title from Show warning when git commit input box only contains linebreaks to Show warning when git commit input box only contains whitespaces Mar 15, 2018

@gnijuohz

This comment has been minimized.

Contributor

gnijuohz commented Mar 15, 2018

PR updated :)

@joaomoreno

This comment has been minimized.

Member

joaomoreno commented Jun 4, 2018

Thanks! 🍻

@joaomoreno joaomoreno merged commit 231ce0c into Microsoft:master Jun 4, 2018

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla All CLA requirements met.

@joaomoreno joaomoreno modified the milestones: Backlog, June 2018 Jun 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment