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

Git-cola crashes when no commit.template is defined #1384

Closed
mroeling opened this issue Feb 27, 2024 · 1 comment
Closed

Git-cola crashes when no commit.template is defined #1384

mroeling opened this issue Feb 27, 2024 · 1 comment

Comments

@mroeling
Copy link

What:
Crash of Git-cola on commit. The resolution for me to fix is easy, but IMHO the application should never crash.

Version / deployment information:

  • version: v4.5.0
  • OS: Ubuntu 23.10
  • install location: ~/Programs/git-cola using Git
  • run location: ~/Programs/git-cola/bin/git-cola

Extra info:

  • no global commit template available

Steps to reproduce:

  • commit any file
  • results in:
    image
  • with error message:

  File "/home/mark.roeling/Programs/git-cola/cola/cmds.py", line 3119, in do
    return cmd.do()
           ^^^^^^^^

  File "/home/mark.roeling/Programs/git-cola/cola/cmds.py", line 833, in do
    template_loader.do()

  File "/home/mark.roeling/Programs/git-cola/cola/cmds.py", line 1682, in do
    raise UsageError(

cola.cmds.UsageError: A commit template has not been configured.
Use "git config" to define "commit.template"
so that it points to a commit template.

Workaround:

  • touch ~/.gitmessage
  • git config --global commit.template ~/.gitmessage
@davvid
Copy link
Member

davvid commented Feb 28, 2024

I suspect that you have Automatically Load Commit Message Template set in your preferences.

That's not really a crash.. it's reporting the misconfiguration, but I agree that it looks too scary, and it uses the same dialog that's used when we have an actual problem in the code.

I'm going to change these so that they emit messages to the Console widget instead. Thanks for the heads-up!

@davvid davvid closed this as completed in 6d74697 Feb 28, 2024
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