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 status is wrong when fsmonitor + untrackedCache are enabled #2473

Open
marcghorayeb opened this issue Nov 1, 2023 · 5 comments
Open

Comments

@marcghorayeb
Copy link

marcghorayeb commented Nov 1, 2023

Big fan of the prompt for years. I've been recently working with very large repositories that have forced me to look into improving the speed of the usual git commands in my workflow. Setting untrackedCache and fsmonitor to true has been a great improvement in that regard, but has a side effect of completely breaking the prompt status for git...

I'm not exactly sure yet as to what is produced by the prompt, but it seems to be completely out of sync with the actual git status. Picture below of the prompt and the output of git status which is clean. I'm easily able to reproduce by just changing branches. At some point, the prompt gets refreshed somehow although a quick edit or branch change breaks it again :(

image

Let me know if I can help debug in any way!

@romkatv
Copy link
Owner

romkatv commented Nov 1, 2023

Is it untrackedCache or fsmonitor that breaks gitstatusd? I'm guessing the latter but would appreciate if you can confirm. Please try different combinations of these flags and let me know which ones work and which don't.

@marcghorayeb
Copy link
Author

Let me try different permutations and I'll get back to you on that 🙏

@marcghorayeb
Copy link
Author

@romkatv sorry for the late reply to this one.

Seems like the culprit in my git config is this one:

[feature]
	manyFiles = true

Strange thing is when I set this back to false, the wrong status is still there for a while...

@romkatv
Copy link
Owner

romkatv commented Jan 31, 2024

Try git status && exec zsh to fully reset all state.

@marcghorayeb
Copy link
Author

Re-executing ZSH does reset the prompt to the correct state 👍

Also, something else I noticed. If I have 2 prompts open on the same repo and I do my git operations with one and end up in a bad state and then I start using the second prompt, the status is correct in the second prompt

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

2 participants