Re: [RFC/PATCH] clone: introduce clone.submoduleGitDir to relocate $GITDIR
Show 8 quoted lines
> If a user is inside .git, I believe setup_git_directory() will also
> find correct gitdir. In that case, we do not want magic (i.e. only do
> your magic when you are inside worktree). Still I'd rather see no
> magic (i.e. command line option) first. Let people try it out for a
> while. If people like it and find it inconvenient, magic can come
> later. I suspect you might want more magic in other places. Maybe if
> you hold it back until you see full picture, you'll only need a few
> new config keys (instead of one per separate magic).
Good suggestion. I'll make it a command-line option for now.
> Just do what scripts do: spawn a process to run rev-parse so that it
> does not mess up the main process. You might be able to introduce
> "dry-run" mode for setup_git_directory(), but that won't be easy.