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

Commit message lost when git returns error code #882

Closed
bakkerthehacker opened this issue Mar 3, 2017 · 2 comments · Fixed by #893
Closed

Commit message lost when git returns error code #882

bakkerthehacker opened this issue Mar 3, 2017 · 2 comments · Fixed by #893

Comments

@bakkerthehacker
Copy link
Contributor

When committing something using ungit, and the commit fails in some way with git returning a non-zero error code, the commit message (title and body) entered into ungit is removed.

This is particularly frustrating when ungit is used with pre-commit hooks. These hooks modify code and use the non-zero git return code to allow you to inspect and re-commit the automatic changes.

In an older version of ungit (not sure which, I could bisect), when git / pre-commit hooks returned non-zero code, the commit message was preserved in the ungit UI. This allowed me to simply press the commit button and see if the pre-commit hooks did anything and press commit again if they did.

In the current version, if the pre-commit hooks fires, I have to retype my commit message. This is a bit cumbersome, and I have worked around it at the moment by copying my message before committing in case the hook fires and I have to paste in the text again.

@dregad
Copy link
Contributor

dregad commented Mar 6, 2017

Sounds related to #831

@capaj
Copy link

capaj commented Apr 2, 2017

@bakkerthehacker I have the same exact frustration! Should be an easy fix.

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

Successfully merging a pull request may close this issue.

3 participants