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

Unhandled error when commiting an empty stage #79

Closed
aerosol opened this issue Apr 10, 2016 · 3 comments
Closed

Unhandled error when commiting an empty stage #79

aerosol opened this issue Apr 10, 2016 · 3 comments
Assignees

Comments

@aerosol
Copy link

aerosol commented Apr 10, 2016

Steps to reproduce:

  1. no staged changes
  2. leader M
  3. CC
  4. type commit message
  5. CC

results with

Error detected while processing function magit#commit_command[12]..<SNR>71_mg_git_commit:

Would be way nicer to warn the user that there's nothing to commit (or simply disable CC).

PS. Thanks for a really nice plugin!

@jreybert jreybert self-assigned this Apr 13, 2016
@jreybert
Copy link
Owner

@aerosol thanks for report, I'll give it a look ASAP.

@jreybert
Copy link
Owner

A fix has been pushed on branch next. Could you give it a try before I merge it to master?

Thanks!

@aerosol
Copy link
Author

aerosol commented Apr 14, 2016

@jreybert very cool, works nicely

jreybert added a commit that referenced this issue Apr 14, 2016
* next:
  doc,README: new help mapping
  plugin/magit.vim: handle empty commit (without staged file) and empty commit message (fix #79)
  autoload/magit/utils.vim: fix strip_array out of bound
  plugin/magit.vim: add magit#get_staged_files() and magit#get_unstaged_files() functions
  plugin/magit.vim: change inline help toggling mapping from 'h' to '?' (fix #80)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants