On Tue, 9 Mar 2021 at 21:52, Derrick Stolee <stolee@xxxxxxxxx> wrote: > > I agree that the layers are confusing. We could rearrange and have > a similar flow to what you recommend by mentioning the extension at > the end: > > **WARNING:** Using a sparse index requires modifying the index in a way > that is not completely understood by other tools. If you have trouble with > this compatibility, then run `git sparse-checkout sparse-index disable` to > rewrite your index to not be sparse. Older versions of Git will not > understand the `sparseIndex` repository extension and may fail to interact > with your repository until it is disabled. I like it. I find this easier to read than the previous version. That said, is `git sparse-index sparse-checkout disable` really the way to do this? I don't see a "sparse-index" subcommand of git-sparse-checkout. ... Hmm, no, after building and installing your patches, I get $ git sparse-checkout sparse-index disable usage: git sparse-checkout (init|list|set|add|reapply|disable) <options> Should that be `git sparse-checkout init --no-sparse-index`? I just tried that on a fresh, empty repo. It seems to work in the sense that it drops the config item. I'm guessing re-initing a sparse checkout is a safe and sane thing to do? I don't find any tests for this. If re-initing should be ok and in particular if it should allow toggling the use of sparse index, it might be good having a test. At a minimum to see that the command passes and that the config item goes away? And check that the actual index is rewritten back to the "old" format? (Sorry if you have that already and I'm just bad at finding it.) Martin