Needs better error messages than "git exited abnormally with code 1". #270

Closed
phil-s opened this Issue Sep 14, 2011 · 3 comments

Comments

Projects
None yet
3 participants
Contributor

phil-s commented Sep 14, 2011

Command-line git:

$ git rebase -i origin/master
Cannot rebase: You have unstaged changes.
Please commit or stash them.

Emacs:

M-x magit-interactive-rebase RET
"git exited abnormally with code 1."

It would be nice if magit could be as informative as the command line was.

(Perhaps this is a more general issue of how to pass the stderr messages through to Emacs?)

Member

sigma commented Oct 24, 2011

I agree this is not ideal, but hitting $ after you get that message should show you what git meant exactly

Contributor

ruediger commented Oct 25, 2011

I agree, too. But the problem is that according to (info "(elisp)Output from Processes")

It is impossible to separate the standard output and standard error
streams of the subprocess, because Emacs normally spawns the subprocess
inside a pseudo-TTY, and a pseudo-TTY has only one output channel. If
you want to keep the output to those streams separate, you should
redirect one of them to a file--for example, by using an appropriate
shell command.

So it would be hard to extract an error message. Maybe adding information that one should hit $ to read the git output would be great or an auto jump to the output buffer (could be customizable). That could be done in a few lines in the process sentinel.

Contributor

phil-s commented Oct 30, 2011

Yes, that $ binding should be strongly advertised. I hadn't even noticed it.

If it is reasonably straightforward to modify magit to use a file for one of the output streams in order to separate the outputs, that would seem like an excellent enhancement.

sigma added a commit to sigma/magit that referenced this issue Dec 8, 2011

give hint in case of git error
refer to the *magit-process* buffer and how to display it in case of an error.
Fixes issue #270

@sigma sigma closed this Dec 8, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment