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

vcs-import with git-repository that requires git-lfs fails in weird way (if git-lfs is not installed) #237

Open
jenisys opened this issue Feb 12, 2022 · 0 comments

Comments

@jenisys
Copy link
Contributor

jenisys commented Feb 12, 2022

VERSION: vcstool 0.3.0
PRECONDITION: git-lfs is not installed

Using vcstool to import a .repos file with https://github.com/pdm-project/pdm.git fails in a weird way (if git-lfs is not installed). This repository requires git-lfs (which not installed initially).
vcs import fails in a weird way that does not hint (at least for me), what the root cause of this problem is.
After I understood what the problem was, I installed git-lfs and everything was fine.

DESIRED CHANGE:
Better description/diagnostics what goes wrong if vcs import is used in this case.

HOW TO REPEAT:

$ vcs import --input=.repos 
=== ./pdm (git) ===
Could not clone repository 'https://github.com/pdm-project/pdm.git': fatal: destination path '.' already exists and is not an empty directory.

# -- CLEANUP and RETRY: With option --debug
$ rm -rf pdm/
$ vcs import --input=.repos --debug
DEBUG:vcstool.executor:started './pdm'
DEBUG:vcstool.executor:ongoing ['./pdm']
DEBUG:vcstool.executor:finished './pdm'
=== ./pdm (git) ===
Could not checkout ref 'main': error: The following untracked working tree files would be overwritten by checkout:
	.gitattributes
	.github/ISSUE_TEMPLATE/bug_report.md
	.github/ISSUE_TEMPLATE/feature_request.md
	.github/PULL_REQUEST_TEMPLATE.md
	.github/workflows/benchmark.yml
	.github/workflows/ci.yml
	.github/workflows/doc.yml
	.github/workflows/release.yml
	.gitignore
...

$ git clone https://github.com/pdm-project/pdm.git pdm_2
Cloning into 'pdm_2'...
remote: Enumerating objects: 15958, done.
remote: Counting objects: 100% (5546/5546), done.
remote: Compressing objects: 100% (1959/1959), done.
remote: Total 15958 (delta 3425), reused 5092 (delta 3106), pack-reused 10412
Receiving objects: 100% (15958/15958), 8.38 MiB | 6.47 MiB/s, done.
Resolving deltas: 100% (10107/10107), done.
git-lfs filter-process: git-lfs: command not found
fatal: the remote end hung up unexpectedly
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

ASSETS:

# -- FILE: .repos
repositories:
  pdm:
    type: git
    url: https://github.com/pdm-project/pdm.git
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

1 participant