Skip to content

Git repositories with spaces in their name are not recognized #1211

Open
@ardislu

Description

@ardislu

Description

The git side panel does not recognize a git repo exists when you open a freshly-cloned repo that has spaces in its name.

For example: a repo with the name repo with spaces in its name is cloned to a folder named repo%20with%20spaces%20in%20its%20name. All the files inside the folder are cloned as expected. However, opening the folder does not trigger the git side panel to recognize any git repo.

Reproduce

  1. Create a new git repo that contains spaces in its name (NOTE: GitHub does not allow this, but other hosts such as Azure DevOps do).
  2. In Jupyter, clone the repo.
  3. Open the folder and try to use the git side panel.

Expected behavior

The repo is cloned successfully and the git side panel works as expected.

Actual behavior

The repo is cloned successfully with the spaces URL encoded in the folder name (i.e. "%20" instead of spaces). However, the git side panel does not detect any git repo inside the folder (it shows the default "You are not currently in a Git repository" page).

Workarounds

Workaround 1: Manually rename the folder to replace the "%20" encoding with spaces. After renaming the folder, the side panel works as expected.
Workaround 2: Open a new terminal and manually use the git CLI.

Context

  • Python package version: 0.41.0
  • Extension version: 0.41.0
  • Git version: 2.34.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions