-
Notifications
You must be signed in to change notification settings - Fork 3.5k
add git sparse checkout #5063
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
add git sparse checkout #5063
Conversation
|
Things to do yet
|
lib/mix/lib/mix/scm/git.ex
Outdated
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.
You can store the :dest option as :checkout or :git_dest so you don't need to use replace_suffix later on.
|
One of the scenarios we will need to test is using the same checkout and moving from sparse to non-sparse and vice-versa (i.e. add and remove the sparse option, does it still work?) |
lib/mix/lib/mix/scm/git.ex
Outdated
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.
You cannot use sparse with the other options?
|
I agree @ericmj I misunderstood the intention. I have changed it to revert that test and I have also added the ability to define multiple sparse options as the sparse function allows this. I haven't figured out a reason you would need to do this to satisfy a dependency, but, I also don't know of a reason not to allow it. As per testing turning it off and on and updating. I didn't see any active git tests in the suite. Should I just try these scenarios out, or do we want to use this time to make additional tests? |
|
hum thats curious, those tests didn't fail for me |
lib/mix/lib/mix/scm/git.ex
Outdated
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 we should allow multiple sparse because dest will point to only one of them.
|
I don't understand why I am getting different test results. I don;t get this failure when I run |
|
I figured out the tests 😄 |
|
so I added a helper which chooses |
|
Also, I've been using this sample for testing |
Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
This is a start to adding sparse checkout to the GIT SCM.
Sparse checkout can be used for picking a dep from a repo which may contain many deps in sub folders
For example.
The git repository
https://github.com/nerves-project/toolchains
contains many toolchains including
nerves_toolchain_armv5tejl_unknown_linux_musleabiTo use git and single out that subfolder int he repo as the dependency destination we could use sparse
{:nerves_toolchain_armv5tejl_unknown_linux_musleabi, github: "nerves-project/toolchains", sparse: "nerves_toolchain_armv5tejl_unknown_linux_musleabi"}