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

bug: Deleted branches still appearing in git checkout suggestions #2101

Open
3 tasks done
anelrh26 opened this issue Sep 20, 2023 · 1 comment
Open
3 tasks done

bug: Deleted branches still appearing in git checkout suggestions #2101

anelrh26 opened this issue Sep 20, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@anelrh26
Copy link

anelrh26 commented Sep 20, 2023

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

  1. Delete a local branch git branch -D sample_branch
  2. Type git checkout and you will see sample_branch is in the suggestion list when it shouldn't

Scenario 2

  1. Delete a remote branch git push --delete origin sample_branch
  2. Update your local git environment with remote git fetch --prune
  3. Type git checkout and you will see sample_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
@mschrage
Copy link
Member

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.

@mschrage mschrage transferred this issue from withfig/fig Sep 26, 2023
@mschrage mschrage added the bug Something isn't working label Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants