You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there exists a directory with the same name as a branch, switching to this branch fails.
The following error message is shown:
Failed to switch branch: fatal: ambiguous argument 'b': both revision and filename Use '--' to separate paths from revisions, like this: 'git [...] -- [...]'
Reproduce
Initialize a new repository and create an initial commit (e.g., creating a README file).
Create a new branch "test". Now, switching branches works as expected.
Switch into branch "main" and create a new directory called "test".
Now, switching back to the branch "test" results in the error above.
Expected behavior
Due to the error, the branch could not be switched.
Thus, the expected behavior is that switching branches works even if there is a directory with the same name.
Context
Python package version: 0.50.0
Extension version: @jupyterlab/git v0.50.0 enabled OK (python, jupyterlab-git)
Git version: 2.42.0
Operating System and its version: Ubuntu 20.04 (WSL)
Command Line Output
[D 2024-02-28 20:40:06.211 ServerApp.jupyterlab_git] Execute ['git', 'diff', 'main', 'test', '--name-only', '-z'] in /home/paul/cammp/del-me-git-extension-test/myrepo.
[D 2024-02-28 20:40:06.216 ServerApp.jupyterlab_git] Code: 128
Output:
Error: fatal: ambiguous argument 'test': both revision and filename
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋
Description
If there exists a directory with the same name as a branch, switching to this branch fails.
The following error message is shown:
Failed to switch branch: fatal: ambiguous argument 'b': both revision and filename Use '--' to separate paths from revisions, like this: 'git [...] -- [...]'
Reproduce
Expected behavior
Due to the error, the branch could not be switched.
Thus, the expected behavior is that switching branches works even if there is a directory with the same name.
Context
0.50.0
@jupyterlab/git v0.50.0 enabled OK (python, jupyterlab-git)
2.42.0
Command Line Output
The text was updated successfully, but these errors were encountered: