Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
get: handle non-DVC repositories #3097
get: handle non-DVC repositories #3097
Changes from 16 commits
0dd5647
07637a6
f126f24
86b9a1c
a01f81e
6cb7308
7873abc
6a4f403
51f2fa1
04619d5
9a98622
5b36ffd
c16f882
f5e40b2
5fb6640
0e2ef47
9f279b3
1f2eed8
f3d234e
de303d4
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolute paths are not allowed even for pure-git repos, hence why I've suggested that example that has the same code handling both non-cached and git files. No need to worry much about second cached_clone being redundand, as we cache those anyways, so the overhead is not big.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. I tried to fold it like you demonstrated before, but it looks like the files are missing if I try to do the copy outside of the context manager.
So I extracted the part that checks if the path is absolute into a function and called it twice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there is any need in removing it, it is a cached copy after all 🙂 And if you check external_repo, it doesn't delete those either. Or am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's good news. I figured there was some automatic cleanup happening but haven't seen how it works yet.