Writing longer commit messages in VS Code

Greetings!

One of the things that absolutely ANNOYS me with VS Code is how it stamps its feet and gets annoying if you try to type a commit message longer than 50 characters in length.

As one comment put it, after he puts in the name of the function he changed, the lion’s share of the characters are gone!

Viz.:

The reference shown above mentions that commit messages should be quite descriptive.  I will agree that book-length commit messages are (just maybe) a tad long, but the 50 character commit message length that VS Code enforces is way too short.

Viz.:
If I commit a change that affects

gopigo3_joystick.force =  Math.abs(Number.parseFloat((jsdata.axes[1]).toFixed(3)));

. . . the mere act of referencing what was changed fills up the commit message allowance.

So, I end up writing commit messages that are so short as to be virtually useless.

Additional research, (see first reference), discloses that neither Git, nor GitHub, limit the length of commit messages, though they may only show the first 80 or 100 characters.

In VS Code there are settings you can change to determine what happens.

  1. git.inputValidationLength
    This allows you to set how long the message can be, before VS Code gets upset.
    • I changed this to 100 on my system, up from the 50 char limit that was there before.
       
  2. git.inputValidation
    This has three settings:
    • Always
    • Warn
    • Off

I am not sure about the “inputValidation” as I have not yet found a good description of it anywhere. All I know is that if you turn it off, it doesn’t complain, and if you set it to “warn” it complains once you exceed the limit set in the first setting.

Some authors set this to “off”.  Since I’m not sure what the effect of this is yet, I’m leaving it at the default of “warn”.  After I’ve played with it for a while, I may set it differently.

2 Likes