-
Notifications
You must be signed in to change notification settings - Fork 59
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
IntelliJ "Annotate" action sometimes fails with truncated output #41
Comments
Thanks for your report. First, it's nice to see that wslgit seems to generally work with IntelliJ, because there is an older issue (#9) which suggests that it does not work with related tools like PHPStorm and Android Studio. Did it require any special configuration in addition to configuring the git executable? Regarding your issue, I can only guess. Do the files showing the wrong behavior maybe have mixed line endings (i.e. The best way to debug this is probably to find out the exact command that is executed by IntelliJ and then run this command manually in a terminal. Then you can compare the output of Git to the lines shown in IntelliJ. |
No additional configuration was required.
No, LF all the way throughout all projects that I'm currently working on. Sure, for some functions it sometimes fails (noticed today additional "Failed to generate diff" error), but what is important (commits, merges, branching, push/pull, setting identity for commit) works without any problem whatsoever. I might have some free time to investigate further in the next week or two, but since it's not a complete dealbreaker for me I won't be giving it the highest priority. |
Yes, it appears some pipe/buffer issue. I get this error:
A much simpler .bat file was showing the same issue, and I was hoping this tool could overcome the issue ;) |
Update, since I'm a moron and forgot to write earlier. I learned some Rust and did a
So it is most likely a pipe/buffer or/and encoding/conversion issue, as @mbeccati said. Good news is also that it can easily be replicated on main wslgit repo - annotating For me, one TODO remains: capture what IntelliJ sends via stdin, and compare command outputs both on Windows, WSL, and normal Linux environment (if necessary). |
@mbeccati So this issue is also present if you call git inside WSL directly from a .bat file? That suggests that the problem is likely elsewhere, not in wslgit. But it would still be interesting to know what is going on. |
@tMaxx That sounds good, thanks for investigating. Maybe the specific byte sequences you mentioned are messed up somewhere in the conversion/translation between WSL and Windows. |
@andy-5 yes, precisely. If I redirect the git output to a file it doesn't seem to be truncated though. This thing remains a mystery to me... I've had to install git for windows to work around the issue. |
It seems to be working fine seemingly for all cases that weren't working before - annotating Windows 10 Pro 17134.407 Haven't updated wslgit since first installing it, so it may not have been its fault to begin with. |
@tMaxx I thought we got rid of it, but I got the issue again just a few minutes ago. Suddenly I saw 3/4th of the open file with the green vertical left bar as if I had just added all those lines. Annotating brought up the error again... |
Restarting the IDE worked for me. |
In my case on Android Studio 4.0 versions gitlab vs local differs, when trying to annotate similar issue |
Background
While working on a Git project I noticed that when trying to annotate a file (GUI equivalent of
git blame
), one of three things can happen, depending on file being annotated:Java unit test files seem to cause the most trouble, probably due to their file/line length, and number of contributors/revisions.
Probably similar to #28...?
System info
wslgit version 0.6.0 official .exe, not additionally configured in any way
WSL: Ubuntu 18.04, Windows 10 Pro build 1803, 17134.228
Default shell changed to zsh
I haven't tried any debugging (to see which command is actually issued to wslgit), or setting
WSLGIT_USE_INTERACTIVE_SHELL=false
yet (don't know if it will even make sense in this case). I'll try later to reproduce it on my second PC, since it has the same WSL config.The text was updated successfully, but these errors were encountered: