Skip to content

Warn when commit message is suspiciously long #478

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

Closed
savchenko opened this issue Jan 6, 2021 · 6 comments
Closed

Warn when commit message is suspiciously long #478

savchenko opened this issue Jan 6, 2021 · 6 comments
Milestone

Comments

@savchenko
Copy link

Is your feature request related to a problem? Please describe.
Users might write extra-long commit messages which frustrate variety of workflows.
Consider someone pushing the following:
image

Describe the solution you'd like

  • Limit 1st line to 50 symbols
  • Keep 2nd line empty
  • Wrap the rest at 72 characters

Describe alternatives you've considered
Format each commit manually.

Additional context
N/A

@extrawurst
Copy link
Collaborator

problem with this is that it is not well defined what limits are correct and I am shying away of requiring the user to fiddle in more config files.

the most common way to assure stuff like this is having (pre)commit-hooks

@extrawurst
Copy link
Collaborator

to reiterate my feedback from the #508:

I am not a fan of this requiring new configuration, abusing the style config I not an option.

my suggestion for an MVP is:

  • we hardcode the first-line-limit to 50
  • we show a red message (first line exceeds x chars) on the bottom (of the dialog, left of the count) if the limit is exceeded

@extrawurst
Copy link
Collaborator

looks like this now:
Screenflick Movie 5

@savchenko
Copy link
Author

I wonder how the 2nd line has appeared. Have you merged/implemented shift+enter somewhere in-between? :)

@extrawurst
Copy link
Collaborator

extrawurst commented Apr 30, 2021

I wonder how the 2nd line has appeared. Have you merged/implemented shift+enter somewhere in-between? :)

that's what the external editor support is currently used for:
image

edit: that is until #509 is merged

@savchenko
Copy link
Author

edit: that is until #509 is merged

Subscribed. Thank you!

@extrawurst extrawurst added this to the v0.16 milestone Apr 30, 2021
extrawurst pushed a commit that referenced this issue May 27, 2021
right now the limit is hardcoded to 50 in accordance to official git best practices

this closes #478
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants