Re: [PATCHv2 0/6] git clone: Marry --recursive and --reference
From: Junio C Hamano <hidden>
Date: 2016-08-09 15:49:46
Stefan Beller [off-list ref] writes:
v3: Thanks to Junios critial questions regarding the design, I took a step back to look at the bigger picture. --super-reference sounds confusing. (what is the super referring to?) So drop that approach. Instead we'll compute where the reference might be in the superproject scope and ask the submodule clone operation to consider an optional reference. If the referenced alternate is not there, we'll just warn about it and carry on.
I like the general direction, but I hope that the warning comes only when the user said "--reference" on the command line (i.e. "you asked me to use reference, but for this submodule I couldn't find a usable one"). If the implementation allows the same mechanism to help later "submodule init && submodule update" borrow from the submodule repositories of the superproject the current superproject borrows from (i.e. no explicit "--reference" on the command line when doing init/update), I would think the case that needs warning is "you didn't explicitly ask me to borrow objects, but I found one we could, so I did it anyway without being asked", and it is not a warning-worthy condition if we didn't find a cloned submodule in the repository our superproject borrows from. Thanks.