withfig / autocomplete

IDE-style autocomplete for your existing terminal & shell
https://fig.io
MIT License
24.53k stars 5.45k forks source link

bug:Git branches suggestions still appear after being deleted #2026

Open anelrh26 opened 1 year ago

anelrh26 commented 1 year ago

Checks

Operating system

macOS 13.3.1 (22E772610a)

Expected behaviour

If a branch is deleted with git branch -D the branch name shouldn't appear in the suggestions when git checkout is typed

Actual behaviour

After deleting local branches with git branch -D, the branch names still appear in the suggestions when git checkout is typed

Steps to reproduce

Result Fig suggestions sill shows the deleted branch

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/myUser/Personal/personal-project
  - exe-path: /usr/local/bin/fig
  - install-method: unknown
  - env-vars:
    - FIGTERM_SESSION_ID: ad47a211-fe62-485b-8e90-fa24fe589ab3
    - FIG_SET_PARENT_CHECK: 1
    - FIG_TERM: 2.16.0
    - PATH: /usr/local/opt/postgresql@13/bin:/Users/myUser/.asdf/shims:/usr/local/opt/asdf/libexec/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/myUser/.fig/bin:/Users/user/.local/bin
    - SHELL: /bin/zsh
    - TERM: xterm-256color
    - __CFBundleIdentifier: com.googlecode.iterm2
    - FIG_PID: 10452
    - FIG_SET_PARENT: ad47a211-fe62-485b-8e90-fa24fe589ab3
grant0417 commented 1 year ago

We cache the branch suggestions, this might be a better issue for https://github.com/withfig/autocomplete as the caching logic is stored in that repo.

esau-morais commented 1 year ago

i'll give this issue a try

esau-morais commented 1 year ago

after trying to reproduce this bug, here's what i've got:

  1. it doesn't happen with local branches
  2. if I push to the upstream and delete it directly there, it'll still suggest till you git fetch

shouldn't this be the expected behaviour? cc. @grant0417

abhirajputnikku7 commented 1 month ago

U can try on CURA digital marketing OCR