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

Message Box on git commit errors is too short #169871

Open
KUGA2 opened this issue Dec 22, 2022 · 2 comments
Open

Message Box on git commit errors is too short #169871

KUGA2 opened this issue Dec 22, 2022 · 2 comments
Assignees
Labels
git GIT issues polish Cleanup and polish issue

Comments

@KUGA2
Copy link

KUGA2 commented Dec 22, 2022

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.74.2
  • OS Version: Windows_NT x64 10.0.19044

Steps to Reproduce:

  1. Create a git commit hook and print some lines in it (e.g. with pre-commit)
  2. Commit a file via the gui "Commit" button
    image
  3. The commit hook fails.
  4. An message box pops up:
    image

This message box has 3 buttons which do work correct. However the text in there is not helpful.
It only shows the first line of the error. In my case this is pretty misleading. The issue is not unstaged files, it is some empty lines!
You can find the real issue with both the "Open Git Log" and the "Show Command Output" button. This is great.

I still think this should not print the first line only. I think it would be best like this:

Git commit failed!  <-- Window headline
-----
Log: 
<A reasonable amount of output lines, maybe 5>
...
-----
[Open Git Log] [Show Complete Command Output] [Cancel]
@CTimmerman
Copy link

CTimmerman commented Mar 25, 2024

I got a less confusing example after i staged all modified files so pre-commit didn't output that warning.

image

As some pre-commit messages can be more than 5 lines, perhaps just put the command output in a scrollable text box.

@radusuciu
Copy link

This still happens and is confusing since it hides the real message.

@KUGA2 KUGA2 changed the title Message Box on git commit erros is too short Message Box on git commit errors is too short May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
git GIT issues polish Cleanup and polish issue
Projects
None yet
Development

No branches or pull requests

5 participants