Skip to content

New folders treated as files in "Changed Files" section of the sidebar component #153

@fgallardograzio

Description

@fgallardograzio

When adding a new folder (with files inside it) to a git project, the "Changed Files" node in the "Repository Status" section of the "GitLens" side bar component only shows the folder itself, not the files it contains. GitLens tries to diff the directory as if it was a file, when the item is clicked, and fails.

  • GitLens Version: 5.2.0
  • VSCode Version: 1.16.1
  • OS Version: Linux Mint 18

Steps to Reproduce:

  1. Add a new folder to an existing git repository
  2. Go to the "git lens" component in the side bar, open the Repository Status node (the one with a text such as "x-branch has uncommitted changes and is up to date with origin/x-branch")
  3. You'll see an item named "1 file changed". If it's one new folder you added it'll always say "1 file changed", even if it contains many new files.
  4. Open that item and you'll see the directory you added, listed as a single item with no sub-items representing the actual files that were added.
  5. Click on that item and you'll get an error. For example, if I added a custom setting.json for a VS Code project, saved in a new .vscode folder, clicking on the .vscode item will result in the following error: Unable to open '.vscode': File is directory (/home/franco/whatever/.vscode).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions