Skip to content

git: repository, add empty dir check to clone #1594

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

CLBRITTON2
Copy link
Contributor

Proposed fix for #1156
Opening as a draft PR to see whether or not the cleanup logic is necessary.
I recycled the cleanup function into an empty dir check to prevent unwanted file deletions on error, but I think an early error would allow the cleanup logic to stay in place without interfering with a user's expectations if we want to keep it.

add check to return early from clone if the destination dir is not
empty, remove cleanup logic that removed files from errored clones - git
doesn't have this logic, update repository_test to test against new
error type
@CLBRITTON2 CLBRITTON2 force-pushed the v6-transport-clone branch from 58dc7c0 to 2db07ff Compare July 1, 2025 11:46
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

Successfully merging this pull request may close these issues.

1 participant