why last commit message is missing?

Answered

I updated the app yesterday to the newest, but when I commit the last commit message is missing. 

in the 2020.1 version the last message will always there.  we use the husky and commit-lint. so now I must input  prefix, It is so bad 

17 comments
Comment actions Permalink

Clear init commit message does not be selected

0
Comment actions Permalink

I really realy do not want to update. Everytime the update must miss some features.  

0
Comment actions Permalink

Is the message box empty, or shows the wrong commit message (not the last one)? Can be https://youtrack.jetbrains.com/issue/IDEA-113049

0
Comment actions Permalink

The message box is empty.

0
Comment actions Permalink

I think the issue "IDEA-113049"  is diff from mine. in pre version "2020.1" this feature is fine, but update the newest is 2021.1 the feature is missing. But that issue was post 8 yeas ago.

0
Comment actions Permalink

啤酒饮料矿泉水 Could you please share what exact prefix do you have in your commit message? Does it contain special characters?

0
Comment actions Permalink

I have detected the same issue since the 2021.1.2 version. The commit message always disappears after close the commit dialog (I am using the modal dialog).

The process is:

  1. I write a commit message (in English)
  2. Click in Commit button
  3. The Code Analysis problems modal appears. I click the Review button
  4. After reviewing the problems I try to commit again
  5. The commit message is empty, but it exists in the Commit Message button

I'm using:

PhpStorm 2021.1.2
Build #PS-211.7142.44, built on April 30, 2021
Runtime version: 11.0.10+9-b1341.41 x86_64
VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o.
macOS 11.3
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 12
Registry: run.processes.with.pty=TRUE
Non-Bundled Plugins: Shifter (1.9.6), com.alayouni.ansiHighlight (1.2.4), com.intellij.properties (211.6693.44), ideanginx9 (0.1.9), net.seesharpsoft.intellij.plugins.csv (2.16.3), net.sjrx.intellij.plugins.systemdunitfiles (0.3.2), org.intellij.plugins.hcl (0.7.10), git-commit-message-plugin (1.3), mobi.hsz.idea.gitignore (4.1.0), name.kropp.intellij.makefile (211.6693.108), org.sonarlint.idea (4.16.0.31683), com.dmarcotte.handlebars (211.6693.44), NEON support (0.5.1), com.dimabdc.idea.php.phpunit (0.5.1), de.espend.idea.laravel (0.15.4), com.kalessil.phpStorm.phpInspectionsEA (4.0.6.3), org.endpointdeps.EndpointDependencies (1.3), lv.midiana.misc.phpstorm-plugins.deep-keys (2021.03.26.001), de.espend.idea.php.toolbox (5.1.1), de.espend.idea.php.annotation (8.0.0), fr.adrienbrault.idea.symfony2plugin (0.23.208), ru.adelf.idea.dotenv (2021.1)

0
Comment actions Permalink

Cmartin

Most likely you have an empty file set as git commit template. Check the git config commit.template output, and unset the config if needed.

Support fro commit template has been added in 2021.1.

0
Comment actions Permalink

Thanks for your answer Dmitriy. Ok, I understand the utility of the commit template, but my problem is that the commit message which I wrote disappears after the commit dialogue is closed. In previous versions, the commit message appeared without search it in the Commit Message History.

0
Comment actions Permalink

Cmartin

It disappears because something, e.g. the empty commit template, overwrites it. It should stay otheriwse

0
Comment actions Permalink

Now I have roll back version 2020.1 eveyting is ok. I promise I will never update new version

0
Comment actions Permalink

Thanks, Dmitriy Smirnov I have verified that this was the problem.

I tried to unset the git configuration using the next code snipped, but it was not working.

git config --global --unset-all commit.template

So, I renamed the template file and the problem was solved:

$ git config commit.template
/Users/cmartin/.stCommitMsg

$ mv /Users/cmartin/.stCommitMsg /Users/cmartin/.stCommitMsg_back
0
Comment actions Permalink

@Dmitriy Smirnov

 

I have the same issue Webstorm; 2021.2.1. I use commitlint & husky, the commit message is stuck with the old one in COMMIT_EDITMSG file, looks like Webstorm take time to update this file, commit-lint then check the OLD value of the file, before Webstorm could update it, so commitlint is broken with Webstorm.

 

I don't have a git config commit.template set.

 

Using git.hooksPath & husky v5 with a pre-commit like this :

 

#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

cd aFolder
npx --no-install commitlint --edit $1
npx --no-install lint-staged
0
Comment actions Permalink

Hello Yohan 9

IDE doesn't use "COMMIT_EDITMSG" it relies either or `git-commit-msg-.txt` (that you can see in "Console" tab of Git toolwindow)
There is a chance that you hooks may work with COMMIT_EDITMSG variable

0
Comment actions Permalink

Ruslan Kuleshov Well it might not use COMMIT_EDITMSG but still commitlint + hooks isn't working with webstorm while it works with other Git clients. My hooks worked fine a few months ago, it was checking the commit msg just fine, with newer versions the commitlint hook always runs against the previous commit msg.

0
Comment actions Permalink

Yohan 9 regrettably, it's hard to say something more specific without additional information and log. Please feel free to submit a support request

0
Comment actions Permalink

i sure as hell cant program, i guess thats the problem. why is this product so bad. vscode actually works unlike the this, if a plugin fails, which randomly happens, maybe its a plugin install or update, there is no schema on plugins there half assed designs from community devs expecting payment for crap that doesnt work, most cause unintended side effects, and no err is thrown in the log i spend days trying to figure out which plugin caused the ide to lose a feature generally the git commit button, which makes the ide a useless waste of my hard earned $$ causing me to be  regret ever swithcing from vscode. the vscode guys have something you dont, a working product that doesnt randomly fail and the ability to fix plugins that do, vs here where i wait until a plugin sometimes never gets updated by the author, so y pay for pulling my hair out when random things break because you allow devs to create knowledge silos or pay plugins, payed plugins always go out of date, lose support and quit working, this makes it appear your ide is broken and us devs that use this for a living go elsewhere.

0

Please sign in to leave a comment.