Skip to content
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
@chimit

Description

@chimit

Edit by @rsese to clarify the problem

Prerequisites

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:

  1. Assuming ~/.gitmessage doesn't exist, add to the project Git config at ./git/config:
[commit]
  template = ~/.gitmessage
  1. Edit and save a file
  2. Stage the file
  3. Write a commit message
  4. 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions