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

Git Diff with version Zed 0.168.3 is working fine, but then every version after that does not work #23759

Open
SmajlovicA opened this issue Jan 28, 2025 · 8 comments
Labels
awaiting info Issue that needs more information from the user

Comments

@SmajlovicA
Copy link

SmajlovicA commented Jan 28, 2025

Describe the bug / provide steps to reproduce it

Summary:

Git Diff with version Zed 0.168.3 is working fine, but then every version after that does not work

Steps to trigger the problem:

  1. Install the latest Zed 0.170.4 and after that if I change any files that have a git repository will not show a visual color change on the file that there are changes in that file. Also within the editor in scroll, there are no visual color changes.
  2. When I go back to version Zed 0.168.3, it works again.

NOTE: I tried to remove my settings.json file to be empty so that is using default settings are results are same.

Actual Behavior:

  • When we change some file in git repo there are no visual color changes in editor.

Expected Behavior:

  • To see git diff on file changes in the sidebar (visual different color for files with changes) and within the editor in the scrollbar.

Zed Version and System Specs

Working version:
Zed: v0.168.3 (Zed)
OS: macOS 15.2.0
Memory: 32 GiB
Architecture: aarch64

Not working version:
Zed: v0.170.4 (Zed)
OS: macOS 15.2.0
Memory: 32 GiB
Architecture: aarch64

@ConradIrwin ConradIrwin added the awaiting info Issue that needs more information from the user label Jan 28, 2025
@ConradIrwin
Copy link
Member

@SmajlovicA hmm! We're actively working on the git stuff, so it seems possible that something may have changed. That said, it is still working for me.

Is this reproducible in all git projects for you, or just some?

Do you have any settings that might affect git?

@SmajlovicA
Copy link
Author

If it works for you, then it could be something with my setup.

Maybe I have something on my laptop that disabling this. Only not sure why is working fine with the 0.168.3 version and not with the next versions.

Thanks

@SmajlovicA
Copy link
Author

SmajlovicA commented Jan 28, 2025

Here is latest version v0.170.4:

Image

When I go back to older version:

Image

There is yellow color

@SmajlovicA
Copy link
Author

SmajlovicA commented Jan 28, 2025

So, I tested again with latest version.

If I open File/open folder directly where is .git then is working fine, but if I open like 2 levels:

Docs/Apps/code_repo/.git <---- this will not work, no color diff
/Apps/code_repo/.git <---- this sometimes works
code_repo/.git <---- this works always

@maxbrunsfeld
Copy link
Collaborator

@SmajlovicA Thanks for narrowing down the problem. Could you share more details about the directory structure that doesn't work? If possible, is there an open-source git repo that reproduces the problem, if it's nested in a certain subdirectory of the Zed project?

@cole-miller
Copy link
Contributor

cole-miller commented Jan 29, 2025

See also the thread of discussion starting here: #22224 (comment)

I wasn't able to reproduce whatever was going on there, but it feels like the same underlying issue. It could have something to do with the change to repository_for_path.

@SmajlovicA
Copy link
Author

Could be but for sure some code change after version 0.168.3 is doing this. Otherwise will not work in this and previous versions. And it seems that is same issue with that thread that you added.

Usually I would maybe delete all and create new folder and clone repos again but it bothers me why is working with 0.168.3.

@SmajlovicA
Copy link
Author

SmajlovicA commented Jan 29, 2025

I downloaded to latest version and started from begining where I created:

L1-folder/L2-folders/.git

It started working, but after cloning 10-15 repos then it stopped working, its like some repos are doing this .. but I do not understand why? And always I mention it is still working with 0.168.3 without any problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting info Issue that needs more information from the user
Projects
None yet
Development

No branches or pull requests

4 participants