Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No error when cloning repo with invalid characters in file names #1563

Closed
1 task done
eroller opened this issue Mar 16, 2018 · 5 comments
Closed
1 task done

No error when cloning repo with invalid characters in file names #1563

eroller opened this issue Mar 16, 2018 · 5 comments

Comments

@eroller
Copy link

eroller commented Mar 16, 2018

  • I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options

git version 2.16.2.windows.1
cpu: x86_64
built from commit: e1848984d1004040ec5199e749b5f282ddf4bb09
sizeof-long: 4
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

Microsoft Windows [Version 10.0.16251.1000]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
$ cat /etc/install-options.txt

Editor Option: VIM
Path Option: CmdTools
SSH Option: OpenSSH
CURL Option: OpenSSL
CRLF Option: CRLFCommitAsIs
Bash Terminal Option: ConHost
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Enabled

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

Tried bash and CMD

git checkout $SHA1
git reset --hard HEAD
  • What did you expect to occur after running these commands?

an error identifying the problematic file names with invalid characters (colon in this case)

  • What actually happened instead?

no error from git checkout or git reset --hard (zero exit code). Full sequence below:

$ git clone https://git.illumina.com/Isas/WGSWorker
Cloning into 'WGSWorker'...
remote: Counting objects: 7201, done.
remote: Compressing objects: 100% (34/34), done.
remote: Total 7201 (delta 23), reused 25 (delta 11), pack-reused 7156
Receiving objects: 100% (7201/7201), 2.72 MiB | 13.22 MiB/s, done.
Resolving deltas: 100% (4979/4979), done.

$ echo $?
0

$ cd WGSWorker

eroller MINGW64 /c/Projects/Isas/WGSWorker (develop)
$ git checkout d0b6625b873d80a87d0201c698f093a97600fe0e
Note: checking out 'd0b6625b873d80a87d0201c698f093a97600fe0e'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at d0b6625 Merge pull request #384 from Isas/app-merge

$ echo $?
0

$ git status
HEAD detached at d0b6625
Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        deleted:    BaseSpaceAppAutoDeploy/Images/Icon100:icon_100_100.png
        deleted:    BaseSpaceAppAutoDeploy/Images/Icon30:icon_30_30.png
        deleted:    BaseSpaceAppAutoDeploy/Images/Icon57:icon_57_57.png

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        BaseSpaceAppAutoDeploy/Images/Icon100
        BaseSpaceAppAutoDeploy/Images/Icon30
        BaseSpaceAppAutoDeploy/Images/Icon57

no changes added to commit (use "git add" and/or "git commit -a")

$ git reset --hard HEAD
HEAD is now at d0b6625 Merge pull request #384 from Isas/app-merge

$ echo $?
0

$ git status
HEAD detached at d0b6625
Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        deleted:    BaseSpaceAppAutoDeploy/Images/Icon100:icon_100_100.png
        deleted:    BaseSpaceAppAutoDeploy/Images/Icon30:icon_30_30.png
        deleted:    BaseSpaceAppAutoDeploy/Images/Icon57:icon_57_57.png

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        BaseSpaceAppAutoDeploy/Images/Icon100
        BaseSpaceAppAutoDeploy/Images/Icon30
        BaseSpaceAppAutoDeploy/Images/Icon57

no changes added to commit (use "git add" and/or "git commit -a")
@eroller
Copy link
Author

eroller commented Mar 16, 2018

It seems the file names are silently being truncated during clone/reset. Surely there is some way to get an error message instead? Note that the new files with truncated file names become empty (file size 0 bytes).

@shiftkey
Copy link

It seems the file names are silently being truncated during clone/reset.

The clone operation is likely failing (there's no output from the clone to confirm what actually happened) because the repository contains paths with a :. This is one of the reserved characters on Windows, and there's probably an error about this reported earlier.

@eroller
Copy link
Author

eroller commented Mar 19, 2018

Modified my original comment to include the full sequence of commands and output. There were no error messages. All commands gave zero exit code.

@kgybels
Copy link

kgybels commented Mar 22, 2018

This is related to #686.

@dscho
Copy link
Member

dscho commented Jan 1, 2020

Addressed via #2440.

@dscho dscho closed this as completed Jan 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants