On 10/14/2021 4:34 PM, Emily Shaffer wrote:
+ sm_gitdir="$(git -C "$sm_path" rev-parse --absolute-git-dir)"
+ relative_gitdir="$(git rev-parse --path-format=relative \
+ --prefix "${sm_gitdir}" \
+ --git-dir)"
+
+ git -C "$sm_path" config --worktree \
+ submodule.superprojectgitdir "$relative_gitdir"
This use of `--worktree` is good because it acts the same as `--local` if
config.worktree doesn't exist. If we discover it is too challenging to find
the correct config file in-core, then we could call this command as a subprocess
in patch 3.
Thanks,
-Stolee