Prompt git status wrong after git hook
Hello! Long-time user, first time issue opener here :)
My auto-formatter seems to be messing with my prompt. I've got it set up with a git hook so it formats when I push and what I'm seeing is after the push the prompt gets tricked into thinking there are changes.
The good news is there's an easy fix, if I run git status the prompt gets the up-to-date information and quits showing me there are changes when there aren't.
It's unlikely that I'll find time to debug this. Sorry.
Same issue here, albeit I'm a new user and have huge number differences.
Not sure if it's the theme or if my .git file is picking up other files?
If you are experiencing the same issue, then the same "resolution" applies.
However, your comment has no indication that you are indeed experiencing the same issue. It could be https://github.com/romkatv/powerlevel10k/issues/2232#issuecomment-1478166292, which has a simple workaround.
@Tyler-Keith-Thompson I don't have this issue with my Git Hooks. Can you share your Git Hook responsible for formatting?
I can be wrong, but I suspect that you don't git add the file again after the formatting, which cause formatted files to not be added to the commit.
Nothing quite so simple I’m afraid. I didn’t screenshot it well but I did document that if I simply run git status my prompt becomes aware of what’s up.
to be fair, this hook looks like it’s trying to be awfully clever: https://github.com/hallettj/git-format-staged
Oh, yes, it's not because of what I suspected then. Oh wow, that's a very big hook !