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

failed clone leaves dangling directory #963

Closed
rcoup opened this issue Feb 2, 2024 · 0 comments
Closed

failed clone leaves dangling directory #963

rcoup opened this issue Feb 2, 2024 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@rcoup
Copy link
Member

rcoup commented Feb 2, 2024

Describe the bug

If you clone a repo, Kart creates a directory for it. If the clone fails before any transfer starts, the empty repo directory is left behind. This can happen if the repo path/URL is wrong, or the user doesn't authenticate.

To Reproduce

$ kart clone me@github.com:wiz/foo
Cloning into '/Users/rcoup/code/kart-data/foo/.clone'...
me@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Error: Error calling git clone
$ ls -l foo
total 0

$ # compare with git clone:
$ git clone me@github.com:wiz/foo
Cloning into 'foo'...
me@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
$ ls -l foo
ls: cannot access 'foo': No such file or directory

Expected behaviour

If Kart creates the directory, then it should delete it again if the clone never starts transferring.

**Version Info **

  • OS: macOS 14.3
  • Version: v0.15.0
@rcoup rcoup added bug Something isn't working good first issue Good for newcomers labels Feb 2, 2024
@olsen232 olsen232 closed this as completed Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants