bug: Deleted branches still appearing in git checkout suggestions
anelrh26 opened this issue · comments
Anel commented
Checks
- I have searched github.com/withfig/fig/issues and there are no duplicates of my issue
- I have run
fig doctor
in the affected terminal session - I have run
fig restart
and replicated the issue again
Operating system
macOS 13.3.1 (22E772610a)
Expected behaviour
After deleting my local and remote git branches, I expect the branch names don't show up in the suggestions when I type git checkout
Actual behaviour
When I delete my local and remote git branches, the branch names still showing up in the suggestions when I type git checkout
Steps to reproduce
Scenario 1
- Delete a local branch
git branch -D sample_branch
- Type
git checkout
and you will seesample_branch
is in the suggestion list when it shouldn't
Scenario 2
- Delete a remote branch
git push --delete origin sample_branch
- Update your local git environment with remote
git fetch --prune
- Type
git checkout
and you will seesample_branch
is in the suggestion list when it shouldn't
Environment
fig-details:
- 2.16.0
hardware-info:
- model:
- model-id:
- chip-id: Apple M1 Pro
- cores: 10
- mem: 16.00 GB
os-info:
- macOS 13.3.1 (22E772610a)
environment:
- shell: /bin/zsh
- terminal: iterm
- cwd: /Users/me/Projects/project
- exe-path: /usr/local/bin/fig
- install-method: unknown
- env-vars:
- FIGTERM_SESSION_ID: 83d705f2-bf14-4acd-a93b-4b0b949778af
- FIG_SET_PARENT_CHECK: 1
- FIG_TERM: 2.16.0
- PATH: /usr/local/opt/postgresql@13/bin:/Users/me/.asdf/shims:/usr/local/opt/asdf/libexec/bin:/usr/local/opt/postgresql@13/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/me/.fig/bin:/Users/me/.local/bin
- SHELL: /bin/zsh
- TERM: xterm-256color
- __CFBundleIdentifier: com.googlecode.iterm2
- FIG_PID: 1674
- FIG_SET_PARENT: 83d705f2-bf14-4acd-a93b-4b0b949778af
Matt Schrage commented
Hmm this sounds like an issue with the suggestion caching. This should be solved by modifying the git.ts completion spec and changing the generator caching policy.