Skip to content

Commit

Permalink
fix: formatted sparse checkout design
Browse files Browse the repository at this point in the history
Signed-off-by: Asish Kumar <[email protected]>
  • Loading branch information
officialasishkumar committed May 28, 2024
1 parent 6352f5b commit a52c590
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions research/design-doc/sparse_checkout_asishkumar.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ kpm add --subdir 1.21/* k8s

This command will download the `1.21` directory and all its contents from the `k8s` repository hosted in https://github.com/kcl-lang/modules


The `kcl.mod` file of the users project will also contain an array of path to the subdirectories.

```
Expand Down Expand Up @@ -56,7 +55,6 @@ This process will involve using the `sparse-checkout` feature of git.

Whenever we want to access the subdirectory using any command, we can refer to `kcl.mod` file of the project and iterate over the `subdir` array to get the path to the subdirectory. The `kcl.mod` file will automatically get updated whenever `kpm add` command is run.


### Additional modifications

To avoid creating a new root for each subdirectory download, I can add some check functions.
Expand All @@ -65,4 +63,4 @@ To avoid creating a new root for each subdirectory download, I can add some chec

1. https://medium.com/@marcoscannabrava/git-download-a-repositorys-specific-subfolder-ceeabc6023e2
2. https://pkg.go.dev/github.com/go-git/go-git/v5
3. https://pkg.go.dev/github.com/hashicorp/go-getter
3. https://pkg.go.dev/github.com/hashicorp/go-getter

0 comments on commit a52c590

Please sign in to comment.