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

remove sparseCheckoutDir #128

Closed
kadel opened this issue Sep 15, 2020 · 3 comments
Closed

remove sparseCheckoutDir #128

kadel opened this issue Sep 15, 2020 · 3 comments
Labels
area/api Enhancement or issue related to the api/devfile specification
Milestone

Comments

@kadel
Copy link
Member

kadel commented Sep 15, 2020

Currently, it is defined as

             "sparseCheckoutDir": {
                "description": "Part of project to populate in the working directory.",
                "type": "string",
                "markdownDescription": "Part of project to populate in the working directory."
              }

As I understand this, if I have a repo with a structure like this.

- file0.txt
- /dir1/
    - file1.txt
- /dir2/
   - file2.txt

and I do sparseCheckoutDir: dir2 I should end up with directory with /file2.txt.
Problem is that this is not how git sparse checkout works, and as far as I know, you can never clone the repo like this.

The way how sparse checkout in git works is that it can populate only certain directories, but the directory structure remains.

For example, If I have a repo with the above structure and I want to do sparse checkout if a /dir2 I would end up with a directory structure like this:

- file0.txt
- /dir2/
   - file2.txt

But what we want to do here is to end up with /file2.txt and that is not what sparse checkout does.

I would actually consider completely removing this field from Devfile, It will create a lot of confusion and problems.

@kadel
Copy link
Member Author

kadel commented Sep 15, 2020

from meeting:
" We are going to remove the sparseCheckoutDir from project and add it to starterProject and rename it to something like subDir. "

@sleshchenko sleshchenko added the area/api Enhancement or issue related to the api/devfile specification label Mar 25, 2021
@l0rd
Copy link
Contributor

l0rd commented Mar 25, 2021

@kadel can we close this issue?

@l0rd l0rd added this to the 2.1 milestone Mar 25, 2021
@elsony
Copy link
Contributor

elsony commented Mar 25, 2021

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Enhancement or issue related to the api/devfile specification
Projects
None yet
Development

No branches or pull requests

4 participants