Message ID | pull.1536.v2.git.1685064781.gitgitgadget@gmail.com (mailing list archive) |
---|---|
Headers | show |
Series | Fix behavior of worktree config in submodules | expand |
On 5/25/2023 9:32 PM, Victoria Dye via GitGitGadget wrote: > About a year ago, discussion on the sparse index integration of 'git grep' > surfaced larger incompatibilities between sparse-checkout and submodules > [1]. This series fixes one of the underlying issues to that incompatibility, > which is that the worktree config of the submodule (where > 'core.sparseCheckout', 'core.sparseCheckoutCone', and 'index.sparse' are > set) is not used when operating on the submodule from its super project > (e.g., in a command with '--recurse-submodules'). > > The outcome of this series is that 'extensions.worktreeConfig' and the > contents of the repository's worktree config are read and applied to (and > only to) the relevant repo when working in a super project/submodule setup. > This alone doesn't fix sparse-checkout/submodule interoperability; the > additional changes needed for that will be submitted in a later series. I'm > also hoping this will help (or at least not hurt) the work to avoid use of > global state in config parsing [2]. > > > Changes since V1 > ================ > > * In 't3007', replaced manual 'git config'/'test_when_finished "git config > --unset"' pairs with 'test_config' helper. Updated 'test_config' to > handle the '--worktree' option. > * Updated commit messages & test comments to better explain the purpose and > more subtle functionality details to the new tests > * Added a commit to move 'struct repository' out of 'git_config_source', > rather than creating a dummy 'config_source' just to hold a repository > instance. > * Changed the config setting in the new tests from 'feature.experimental' > to 'index.sparse' to tie these changes to their intended use case. > * "super project" -> "superproject" Thanks for these updates. I'm happy with this version. Thanks, -Stolee
"Victoria Dye via GitGitGadget" <gitgitgadget@gmail.com> writes: > * Added a commit to move 'struct repository' out of 'git_config_source', > rather than creating a dummy 'config_source' just to hold a repository > instance. > * Changed the config setting in the new tests from 'feature.experimental' > to 'index.sparse' to tie these changes to their intended use case. > * "super project" -> "superproject" Thanks! Discounting the discussions on the side thread (which we've decided are mostly out of scope) I think this version is good enough to merge as-is. In https://lore.kernel.org/git/kl6llegnfccw.fsf@chooglen-macbookpro.roam.corp.google.com I said that this series is better if we squash in a patch to drop the setup code from discover_git_directory(), but on hindsight, I think it also makes perfect sense for me to send that as a standalone patch. Let me know if you plan to squash it in or not so I'll know whether to send it :)
Glen Choo wrote: > "Victoria Dye via GitGitGadget" <gitgitgadget@gmail.com> writes: > >> * Added a commit to move 'struct repository' out of 'git_config_source', >> rather than creating a dummy 'config_source' just to hold a repository >> instance. >> * Changed the config setting in the new tests from 'feature.experimental' >> to 'index.sparse' to tie these changes to their intended use case. >> * "super project" -> "superproject" > > Thanks! Discounting the discussions on the side thread (which we've > decided are mostly out of scope) I think this version is good enough to > merge as-is. > > In > > https://lore.kernel.org/git/kl6llegnfccw.fsf@chooglen-macbookpro.roam.corp.google.com > > I said that this series is better if we squash in a patch to drop the > setup code from discover_git_directory(), but on hindsight, I think it > also makes perfect sense for me to send that as a standalone patch. Let > me know if you plan to squash it in or not so I'll know whether to send > it :) Thanks for the re-review! This series was just merged to 'next', so I think sending the new patch separately would be the least disruptive option.