NeogitOrg / neogit

An interactive and powerful Git interface for Neovim, inspired by Magit
MIT License
4.1k stars 241 forks source link

Status is not updated after 'Worktree > Goto' #1537

Open paidhi opened 3 weeks ago

paidhi commented 3 weeks ago

Description

If I switch to a Git worktree ('Worktree > Goto') the interface is not updated to reflect the new location/branch. The 'NeogitStatus' buffer still shows information about the prior location/branch.

Neovim version

NVIM v0.10.2 Build type: Release LuaJIT 2.1.1727870382

Operating system and version

Fedora Linux 40

Steps to reproduce

  1. Open NeogitStatus
  2. Change to another worktree ('Worktree > Goto')

Expected behavior

The interface in the NeogitStatus buffer updates to reflect the new location & branch.

Actual behavior

The 'NeogitStatus' buffer still shows information about the prior location/branch:

<c-r> to refresh does not update the information. The only change I can see is that :pwd shows the path to the worktree I switched into. Also 'Log > Current' or 'Log > HEAD' use the prior branch.

The only way I can update the interface to refelect the new location is to quit the 'NeogitStatus' buffer and reopen it.

Minimal config

-- Installed Neogit via Lazy.nvim

{ 'NeogitOrg/neogit',
  cmd = 'Neogit',
  dependencies = {
    'nvim-lua/plenary.nvim',
    'nvim-telescope/telescope.nvim',
    'sindrets/diffview.nvim',
  },
  config = true
},