Mark Levedahl <mlevedahl@xxxxxxxxx> writes: > Junio C Hamano wrote: > ... >> Perhaps git-submodule.sh::modules_update should use $url it >> obtains from the configuration in the upper level when running >> git-fetch in the submodule. >> > yes, I like this change, it works very nicely. but that last patch is > only a partial solution... >> If you view the problem this way, your earlier "git fetch while >> the HEAD is detached always uses 'origin'" may turn out to be a >> non-issue. >> >> Which again brings us back to Johannes's earlier point. If the >> issue is about submodule, maybe what needs to be fixes is in >> git-submodule, and not the defaulting to 'origin' git-fetch and >> friends do. >> > Nope, git submodule *still* requires origin (e.g., execute git > submodule init or update on a detached head). Now I am even more confused. The approach I suggested in a few paragraphs above, to which you just said "I like this change", is about making "git submodule update" to use the url configured in the upper level repository when it runs "git fetch". I am looking at around l.238 of git-submodule.sh. In the current code, it runs "git-fetch" without any parameter, which would allow it default to origin or whatever, which may or may not be desirable depending on where the 'origin' points at. If you make that particular git-fetch explicitly say where the fetch should be done from, wouldn't it fix the issue for that codepath? Why does it still require origin? - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html