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

Diffs view is always blank #182

Open
hippydream opened this issue Sep 14, 2023 · 9 comments
Open

Diffs view is always blank #182

hippydream opened this issue Sep 14, 2023 · 9 comments

Comments

@hippydream
Copy link

Hi,
I found this very promising tool and it's looking great so far, so well done.
Unfortunately I'm experiencing a weird issue where the diffs view is always blank (see screenshot).

I tried re-installing, clearing the cache, clearing the GitFiend settings dir, but no success.

The inspector console doesn't show errors either (just a "warning: git-credential-manager-core was renamed to git-credential-manager".. shouldn't be related though). Looking at other bug reports, I checked the load_wip_patches network request when a file is selected in the modified files list, but the returned payload is an empty array.. not sure if that's where the diffs are fetched: {"Ok":[]}

I tried several github repos and the Qt and Qt Creator repos.. always getting a blank view.

PS: Windows 11, 64bit, latest GitFiend 0.42.1.0 and latest git for Windows (2.42.0)

bug

@GitFiend
Copy link
Owner

Thanks for the bug report, I'll take a look into this today.

@GitFiend
Copy link
Owner

I just tried to replicate this and failed. Windows 11, latest Git installed and even the same qt creator repo and commit. It could be you have some git config I haven't handled?

The load_wip_patches request is your work in progress/ changes. The one that should be returning the commit code changes is "load_hunks". I suspect this is returning null. I've uploaded a pre-release of gitfiend that returns the error message instead of null for load_hunks. https://github.com/GitFiend/Support/releases/tag/0.43.0

@hippydream
Copy link
Author

We are on "slightly" different time zones I think.. it's morning here at the moment :)

Anyway.. I realized I tried everything except rename my .gitconfig to see if it fixed it and I can confirm it works, so it is something in my config file. I have that file for ages and I can't think of anything specific that could cause the problem but I'll find out with the well established method of adding back each setting until I break the app again :)

Might not be something odd in my config that you don't need to care about.. I'll let you know soon.

@hippydream
Copy link
Author

Problem found. I had a [color] section with these values:

[color]
ui = always
diff = always
status = always
branch = always

I can't remember when I added them but the diff and ui settings will trigger the problem. Switching the values to "auto" ("omit color code output if the output stream is redirected to a file or piped to another process") will fix the issue while retaining colored output when used from the command line.

I don't think you'll have to fix anything but at least these notes could be useful to someone else :)

Thanks again for your feedback.. and I'm sorry I didn't realize it earlier. This project is looking very promising so good luck with it!

@GitFiend
Copy link
Owner

Oh interesting. Thanks for the investigation and info. It looks like protecting against is pretty straight forward, so I think I'll add it.

@alr888rav
Copy link

alr888rav commented Sep 26, 2023

I have the same issue. Where can I find these color settings?

@GitFiend
Copy link
Owner

hippydream was referring to custom settings in .gitconfig. If you have been modifying this with overrides for git commands then it could cause an issue. You could also try out the latest build 0.43.2 (Beta) at https://gitfiend.com/all-downloads which contains bug fixes.

@alr888rav
Copy link

alr888rav commented Sep 27, 2023

Thank you, new version works as expected.

@hippydream
Copy link
Author

I can also confirm that the latest beta release fixes the issue, well done :-)

@alr888rav: I had my color settings in the global C:\Users\<username>\.gitconfig (should be ~/.gitconfig on Linux). You can also set them from the command line with, for instance, "git config --global color.ui auto". The "Customizing Git" page on the git website has a small section about colors, in case you are curious.

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

No branches or pull requests

3 participants