This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
"Invalid commit template path set in Git config" error and commit button doesn't work if commit template doesn't exist #2106
Open
Description
Edit by @rsese to clarify the problem
Prerequisites
- [ X] Put an X between the brackets on this line if you have done all of the following:
- Reproduced the problem in Safe Mode: https://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: https://flight-manual.atom.io/hacking-atom/sections/debugging/
- Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
- Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
- Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
If you set a commit template in your Git config but the template doesn't exist, there's no visible error and the commit button doesn't work.
Console output:
Uncaught (in promise) Error: Invalid commit template path set in Git config: /Users/me/.stCommitMsg
at Proxy.fetchCommitMessageTemplate (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:14:2834661)
at <anonymous>
Steps to Reproduce
For some Git project:
- Assuming
~/.gitmessage
doesn't exist, add to the project Git config at./git/config
:
[commit]
template = ~/.gitmessage
- Edit and save a file
- Stage the file
- Write a commit message
- Press the Commit button
Expected behavior:
If the commit template doesn't exist, maybe either a error popup that mentions the template doesn't exist or maybe just allow the commit with whatever message is used since there is no template?
Actual behavior:
Commit button doesn't do anything and there's no error popup. Error in console:
Uncaught (in promise) Error: Invalid commit template path set in Git config: /Users/me/.stCommitMsg
at Proxy.fetchCommitMessageTemplate (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:14:2834661)
at <anonymous>
Versions
Atom : 1.36.1
Electron: 2.0.18
Chrome : 61.0.3163.100
Node : 8.9.3
apm 2.1.3
npm 6.2.0
node 8.9.3 x64
atom 1.36.1
python 2.7.10
git 2.21.0
macOS Mojave 10.14.4 (18E226)