Skip to content

Prunes stale closed repository entries (#313551)#313554

Open
eamodio wants to merge 1 commit intomicrosoft:mainfrom
eamodio:bug/remove-dead-closed-repos
Open

Prunes stale closed repository entries (#313551)#313554
eamodio wants to merge 1 commit intomicrosoft:mainfrom
eamodio:bug/remove-dead-closed-repos

Conversation

@eamodio
Copy link
Copy Markdown
Contributor

@eamodio eamodio commented Apr 30, 2026

Closes #313551

  • Removes closed repository records from the manager if the underlying path no longer exists on disk
  • Prevents dead repository entries from persisting when a user attempts to reopen a deleted or moved folder

/cc @lszomoru

 - Removes closed repository records from the manager if the underlying path no longer exists on disk
 - Prevents dead repository entries from persisting when a user attempts to reopen a deleted or moved folder
Copilot AI review requested due to automatic review settings April 30, 2026 17:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses stale closedRepositories workspace-state entries in the Git extension by pruning closed repository paths that no longer exist on disk when a reopen attempt fails, preventing “dead” entries from persisting and repeatedly prompting the user.

Changes:

  • On failed openRepository attempts with openIfClosed=true, checks whether the requested path exists on disk.
  • If the path is missing, removes that path from the closed-repositories manager and logs the pruning event.

Comment thread extensions/git/src/model.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Git: deleted closed-repository folders are stuck in workspaceState

3 participants