On Wed, Dec 7, 2022 at 12:27 PM Derrick Stolee via GitGitGadget <gitgitgadget@xxxxxxxxx> wrote: > The previous change allowed skipping the hashing portion of the > hashwrite API, using it instead as a buffered write API. Disabling the > hashwrite can be particularly helpful when the write operation is in a > critical path. > > One such critical path is the writing of the index. This operation is so > critical that the sparse index was created specifically to reduce the > size of the index to make these writes (and reads) faster. > > Following a similar approach to one used in the microsoft/git fork [1], > add a new config option (index.skipHash) that allows disabling this > hashing during the index write. The cost is that we can no longer > validate the contents for corruption-at-rest using the trailing hash. > [...] > Signed-off-by: Derrick Stolee <derrickstolee@xxxxxxxxxx> > --- > diff --git a/Documentation/config/index.txt b/Documentation/config/index.txt > @@ -30,3 +30,11 @@ index.version:: > +index.skipHash:: > + When enabled, do not compute the trailing hash for the index file. > + Instead, write a trailing set of bytes with value zero, indicating > + that the computation was skipped. > ++ > +If you enable `index.skipHash`, then older Git clients may report that > +your index is corrupt during `git fsck`. This documentation is rather minimal. Given this description, are readers going to understand the purpose of the option, when they should use it, what the impact will be, when and why they should avoid it, etc.? > diff --git a/t/t1600-index.sh b/t/t1600-index.sh > @@ -65,6 +65,14 @@ test_expect_success 'out of bounds index.version issues warning' ' > +test_expect_success 'index.skipHash config option' ' > + ( > + rm -f .git/index && > + git -c index.skipHash=true add a && > + git fsck > + ) > +' What is the purpose of the subshell here?