> git clone 'https://github.com/vanila-io/wireflow' 'wireflow-original'
Cloning into 'wireflow'...
error: invalid path 'src/setupTests.js '
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
git status shows a bunch of deleted paths that are staged.
unstaging them does nothing to the filesystem/workspace.
git reset --hard shows the same error and the dir remains empty.
> git config core.protectNTFS
Windows 10 Pro 64-bit 20H2
Cygwin terminal environment
Fish shell
> git ls-tree origin/master src/setupTests.js
> git ls-tree origin/master 'src/setupTests.js '
100644 blob fe302b4a5049693ca40913b556e3c5210424ad0d src/setupTests.js
> git mv 'src/setupTests.js ' 'src/setupTests.js'
fatal: bad source, source=src/setupTests.js , destination=src/setupTests.js
> git mv 'src/setupTests.js ' 'src/setupTests.js1'
fatal: bad source, source=src/setupTests.js , destination=src/setupTests.js1
> git rm 'src/setupTests.js '
fatal: pathspec 'src/setupTests.js ' did not match any files
> git rm 'src/setupTests.js'
fatal: pathspec 'src/setupTests.js' did not match any files
> ls -l
total 0
> git restore --staged 'src/setupTests.js'
error: pathspec 'src/setupTests.js' did not match any file(s) known to git
> git restore --staged 'src/setupTests.js '
error: invalid path 'src/setupTests.js '
error: pathspec 'src/setupTests.js ' did not match any file(s) known to git
> git restore --staged 'src/index.js '
error: pathspec 'src/index.js ' did not match any file(s) known to git
> git restore --staged 'src/index.js'
> git restore src/index.js
> ls -l
total 0
drwxr-xr-x 1 User None 0 Apr 27 13:35 src/
> ls -l src
total 1
-rw-r--r-- 1 User None 719 Apr 27 13:35 index.js
> git status --porcelain
...
D src/index.css
D src/serviceWorker.js
D "src/setupTests.js "
D src/utils/index.js
D yarn.lock
#>git status --porcelain | awk '{ print $2 }' | while read path; git restore --staged "$path"; end;
>git status --porcelain | sed -r 's|^ ?\w +?||' | tr -d \" | while read path; git restore --staged "$path"; end;
error: invalid path 'src/setupTests.js '
error: pathspec 'src/setupTests.js ' did not match any file(s) known to git
>
git status --porcelain | sed -r 's|^ ?\w +?||' | tr -d \" | while read path; git restore "$path"; end;
error: pathspec 'src/setupTests.js ' did not match any file(s) known to git
> find -mindepth 1 | wc -l
227
> git status
On branch master
Your branch is up to date with 'origin/master'.
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
deleted: src/setupTests.js
> git status --porcelain
D "src/setupTests.js "
> git commit
[master 0cb4a8e] Removing file with invalid path for git.
1 file changed, 6 deletions(-)
delete mode 100644 src/setupTests.js
>
git diff 1ce56b9dd792aebdb43802e3eac30f464eb3d934 -- 'src/setupTests.js '
...
>
git cat-file -p fe302b4a5049693ca40913b556e3c5210424ad0d > src/setupTests.js
> git commit
[master 1f568e7] Added troublesome file back to tree with correct path without trailing space.
1 file changed, 6 insertions(+)
create mode 100644 src/setupTests.js
> git ls-tree origin/master 'src/setupTests.js '
100644 blob fe302b4a5049693ca40913b556e3c5210424ad0d src/setupTests.js
> git ls-tree HEAD src/setupTests.js
100644 blob fe302b4a5049693ca40913b556e3c5210424ad0d src/setupTests.js
> git clone 'https://github.com/vanila-io/wireflow' 'wireflow-original'
read> wireflow-original
Cloning into 'wireflow-original'...
error: invalid path 'src/setupTests.js '
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
> cd wireflow-original
> git init
Reinitialized existing Git repository in D:/JStuff/Programming/Others/Internet/wireflow-original/.git/
> git remote add origin 'https://github.com/vanila-io/wireflow' -f
fatal: remote origin already exists.
> git checkout origin/master -f
error: invalid path 'src/setupTests.js '
> ls -l
total 0
> git clone 'https://github.com/Pysis868/wireflow' 'wireflow-fixed'
read> wireflow-fixed
Cloning into 'wireflow-fixed'...
> ls -l wireflow-fixed/
total 550
...
> find wireflow-fixed/ -mindepth 1 | wc -l
228
I was going to add a diff check for the fs contents, but that person's Part 1 method did not provide positive results as described, so I will go ahead with the PR.
At least the fixed repo I have does now.
git status
shows a bunch of deleted paths that are staged. unstaging them does nothing to the filesystem/workspace.git reset --hard
shows the same error and the dir remains empty.Windows 10 Pro 64-bit 20H2 Cygwin terminal environment Fish shell
GitHub - vanila-io / wireflow2:
README.md
:I was going to add a diff check for the fs contents, but that person's Part 1 method did not provide positive results as described, so I will go ahead with the PR. At least the fixed repo I have does now.
Links