ibvhefe / SelectiveCheckout

2 stars 2 forks source link

sparse-checkout add <patterns> additive for each pipeline run #7

Open mthurlkill-nano opened 5 months ago

mthurlkill-nano commented 5 months ago

I believe there is a bug that will result in the sparse-checkout config including multiple paths for subsequent runs of a pipeline. Not an issue for ADO hosted agents, since they are wiped each time, but is an issue for self hosted agents. SelectiveCheckout calls git clone on the directory. Then calls "git sparse-checkout add" for each path specified. In the subsequent run, git clone will essenrially be a nop if pointing to the same directory. Then git sparse-checkout add will add the same paths again, or if the paths were changed you might have some that you weren't intending still there and new ones added. Maybe call "git sparse-checkout set /" before the calls to git sparse-checkout add.