Skip to content

git: always show clone destination picker when cached repo exists#309247

Open
yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
yogeshwaran-c:fix/git-clone-wizard-folder-selection-307824
Open

git: always show clone destination picker when cached repo exists#309247
yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
yogeshwaran-c:fix/git-clone-wizard-folder-selection-307824

Conversation

@yogeshwaran-c
Copy link
Copy Markdown
Contributor

Problem

When running Git: Clone and the repository URL had exactly one cached clone location, tryOpenExistingRepository() bypassed the quick pick prompt and directly used that cached path. The user was never shown the "Open Existing Repository Clone" dialog with the "Clone again" option, so they could not choose a new destination folder.

Root cause

In cloneManager.ts, when existingCachedRepositories.length === 1, the code short-circuited directly to the cached workspace path without calling chooseExistingRepository().

Fix

Always route through chooseExistingRepository() regardless of the number of cached entries, so the user can pick the existing clone or opt to clone again into a different folder.

Fixes #307824

When a repository URL had exactly one cached clone location,
tryOpenExistingRepository() bypassed the quick pick prompt and
directly used that cached path. The user was never shown the
dialog with the "Clone again" option, so they could not choose
a new destination folder.

Always route through chooseExistingRepository() regardless of
the number of cached entries.

Fixes microsoft#307824
@vs-code-engineering
Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@lszomoru

Matched files:

  • extensions/git/src/cloneManager.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: Clone wizard skips destination folder selection step in VS Code Insiders

2 participants