Thanks for the info Mark! I'm curious what are the "use cases that might break" if I enabled "Honor refspec on initial clone" which you mention in your Live Demo video around 7:55. I would guess that my team's use case, which is performing branch-specific multibranch pipeline builds that do not need to know about other branches, is the use case that could very much benefit from customizing the refspec to fetch only the branch a particular branch pipeline project cares about. (If this use case doesn't benefit I can't imagine one that would.)
Looking in my multibranch pipeline job "BranchSource" config after adding "Advanced clone behaviours" I can check "Honor refspec on initial clone". I am assuming here it is critical for me to additionally set "Specify ref specs" behavior at the same time. BTW, do you know, can I use ${BRANCH_NAME} env var in the refspec, e.g. will this work for a mb pipeline refspec?
+refs/heads/${BRANCH_NAME}:refs/remotes/@{remote}/${BRANCH_NAME}
Seems like this should be a built-in option for mb pipeline configs. Anyway, I will experiment with this and see how much time savings we get. Let me know if there's anything else I should know about this or if I'm making any wrong assertions above.
..and to my original question, I suppose this means there's really no way to achieve a true "single fetch per build, tags and all", without removing either the "WipeWorkspaceTrait" or the "CleanBeforeCheckoutTrait", correct? I'm actually ok with it doing multiple fetches as long as it preserves the things (tags) it fetched initially. I don't understand why the implementation/timing of these traits are clobbering the tags I fetched in the initial clone.
Which is to say.. Why is there the distinction between the "initial fetch" and "the checkout"? I think there's a lot going on in the plugin-background here I don't understand. Can you point me to some docs that explain these concepts?
My team is interested in performing "clean checkouts" each build but perhaps we should be less paranoid and remove the above Traits (and maybe use a reference repo as well.)
Thanks again.