consider a git init on an empty folder to still be empty#314249
Draft
consider a git init on an empty folder to still be empty#314249
Conversation
Collaborator
Author
|
~requires-eval-assessment vscbench "jupyter.interactiveWindow.notebookRepl": true |
Contributor
|
⏳ Queued vscode build for
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Copilot new-workspace flow in the built-in extension so that folders containing only a .git entry are treated as effectively empty, which is intended to support freshly git init'd or empty cloned repositories.
Changes:
- Added a helper in the new workspace tool to classify
.git-only folders as effectively empty. - Reused that helper when checking the current workspace before prompting to open another folder.
- Reused the same helper when validating a folder selected from the open-folder dialog.
Show a summary per file
| File | Description |
|---|---|
extensions/copilot/src/extension/tools/node/newWorkspace/newWorkspaceTool.tsx |
Broadens the empty-folder check used by the Copilot new-workspace scaffolding flow. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 1
Comment on lines
+47
to
+49
| private async _isEffectivelyEmpty(folder: Uri): Promise<boolean> { | ||
| const entries = await this.fileSystemService.readDirectory(folder); | ||
| return entries.every(([name]) => name === '.git'); |
This comment was marked as low quality.
This comment was marked as low quality.
Contributor
|
🚀 Queued eval-assessment publish build for
|
Contributor
|
✅ Eval-assessment build published.
|
Contributor
|
🔬 Queued eval-assessment benchmark for
Results will be posted back here when the run completes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.