nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.5k stars 2.34k forks source link

[Import] importing repo having files with special characters breaks the move #27468

Closed EelcoLos closed 2 months ago

EelcoLos commented 2 months ago

Current Behavior

when trying to use nx import with a file with special characters, git mv breaks

Expected Behavior

all files can be imported, even if they contain special characters

GitHub Repo

https://github.com/EelcoLos/nx-tinkering

Steps to Reproduce

  1. clone repo on main branch
  2. create a folder 'import' on the root folder structure
  3. use the import command to import the special-char branch into another folder. I used the command: nx import https://github.com/EelcoLos/nx-tinkering.git import --ref special-char --source apps
  4. the error shows

Nx Report

NX   Report complete - copy this into the issue template

Node           : 20.16.0
OS             : win32-x64
Native Target  : x86_64-windows
npm            : 10.8.2

nx (global)        : 19.5.7
nx                 : 19.6.0
@nx/js             : 19.6.0
@nx/jest           : 19.6.0
@nx/linter         : 19.6.0
@nx/eslint         : 19.6.0
@nx/workspace      : 19.6.0
@nx/angular        : 19.6.0
@nx/devkit         : 19.6.0
@nx/eslint-plugin  : 19.6.0
@nx/playwright     : 19.6.0
@nrwl/tao          : 19.6.0
@nx/vite           : 19.6.0
@nx/web            : 19.6.0
@nx/webpack        : 19.6.0
typescript         : 5.5.3
---------------------------------------
Registered Plugins:
@nx/playwright/plugin
@nx/eslint/plugin
@nx-dotnet/core
---------------------------------------
Community plugins:
@nx-dotnet/core : 2.2.0

Failure Logs

NX   Command failed: git mv apps/nx-tinkering/assets/test&demo.svg C:\Users\elos\AppData\Local\Temp\nx-import\repo\import\apps\nx-tinkering\assets\test&demo.svg

usage: git mv [<options>] <source>... <destination>

    -v, --[no-]verbose    be verbose
    -n, --[no-]dry-run    dry run
    -f, --[no-]force      force move/rename even if target exists
    -k                    skip move/rename errors
    --[no-]sparse         allow updating entries outside of the sparse-checkout cone

'demo.svg' is not recognized as an internal or external command,
operable program or batch file.
'demo.svg' is not recognized as an internal or external command,
operable program or batch file.

Pass --verbose to see the stacktrace.

Package Manager Version

10.8.2

Operating System

Additional Information

No response

github-actions[bot] commented 1 month ago

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.