Junio C Hamano <gitster@xxxxxxxxx> writes: > Glen Choo <chooglen@xxxxxxxxxx> writes: > >> Move the logic of "git submodule--helper ensure-core-worktree" into >> run-update-procedure. Since the ensure-core-worktree command is > > I take it as "... command is now obsolete", or "... has become > obsolete"? Yes, that's a better phrasing. > On the script side, the removed call to ensure-core-worktree used > to precede these invocations of the helper > > submodule--helper relative-path > submodule--helper remote-branch > submodule--helper print-default-remote > > before we triggered run-update-procedure, so these helper calls were > done only after we made sure we have a submodule there at the path > and its configuration file has core.worktree set correctly. If we > failed to do so, we wouldn't have made these calls. > > Now we call them unprotected. It is not immediately obvious if that > is a safe/sensible thing to do. > > I would imagine that we would lose more and more code from the > script in the "while" loop before run-update-procedure is triggered, > and presumably the equivalent code will be added _after_ the call to > ensure_core_worktree() this patch adds to the beginning of > update_submodule2(), so in the end, the above will presumably become > a non-issue, but the series structure still feels iffy because of it. I could restructure this series so that this patch is as late as possible, so we don't have to worry about safety for 'remote-branch' and 'print-default-remote', but we still have to consider 'relative-path' because that's still around by the end of this series. Fortunately, relative_path is just a wrapper around dir.h's relative_path(), which AFAICT is just general purpose string manipulation and has nothing to do with Git. (I'm also certain that the other two commands don't interact with core.worktree either, but I'll just restructure the series so that the point is moot.)