Thread (25 messages) flat view 25 messages, 5 authors, 2021-11-09

Re: [PATCH v4 4/4] submodule: record superproject gitdir during 'update'

From: Derrick Stolee <hidden>
Date: 2021-10-25 16:17:31

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help