-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Cached prompt not updated immediately for git worktree #6085
Labels
🐛 bug
Something isn't working
Comments
I'm working on a fix. |
heaths
added a commit
to heaths/oh-my-posh-actual
that referenced
this issue
Jan 10, 2025
heaths
added a commit
to heaths/oh-my-posh-actual
that referenced
this issue
Jan 10, 2025
This was referenced Jan 10, 2025
JanDeDobbeleer
pushed a commit
to heaths/oh-my-posh-actual
that referenced
this issue
Jan 11, 2025
JanDeDobbeleer
pushed a commit
to heaths/oh-my-posh-actual
that referenced
this issue
Jan 11, 2025
JanDeDobbeleer
pushed a commit
that referenced
this issue
Jan 11, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Code of Conduct
What happened?
Though I'm positive I tested this (perhaps not?), my changes to effectively invalidate the cache for the
git
segment don't work for worktrees. That is, if I switch branches, the cache timeout still applies. This works correctly for primary repos.The problem is in
oh-my-posh/src/segments/git.go
Line 227 in dd9fbb6
dir.Path
at that point to be the resolved primary repo or worktree thereunder directory, but isn't. I did a lot of refactoring to reduce duplicate code and reduce file reads, so at least a few iterations I know it worked but maybe the last iteration I committed has the ordering wrong.That is, a worktree's
.git
root file will point to the primary repo's.git/worktrees/{worktree-name}/
directory and that's where we need to read theHEAD
file.Theme
theme.omp.yml
What OS are you seeing the problem on?
Windows, Linux, macOS
Which shell are you using?
bash
Log output
The text was updated successfully, but these errors were encountered: