Re: [PATCH 2/4] read-cache: add index.skipHash config option
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Dec 12, 2022, 18:55 UTC
- Message-ID
- <CAPig+cTA=4DZEhM23tVfoRjxPuBAgs=+UGc5+-6rg4DYQxxKdg@mail.gmail.com>
- In-Reply-To
- <37efcfcd-fea1-c1d7-65f7-ae5f2d2a12e6@github.com>
On Mon, Dec 12, 2022 at 8:59 AM Derrick Stolee <derrickstolee@github.com> wrote:
Show 17 quoted lines
> On 12/7/2022 1:59 PM, Eric Sunshine wrote: > > On Wed, Dec 7, 2022 at 12:27 PM Derrick Stolee via GitGitGadget > > <gitgitgadget@gmail.com> wrote: > >> +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.? > > I will expand this with explicit version numbers for older Git versions.
Okay, but that doesn't address the larger questions I asked. The documentation, as written, gives no explanation of the purpose of this option. Since you conceived of the option and implemented it, you implicitly understand its use-case and repercussions which might arise from using it, but is the typical reader going to understand all that? Namely, is the reader going to understand:
* why this option exists * what problem it is trying to solve * when to use it * when not to use it * what the repercussions are of not computing a hash for the index * etc.
Are the answers to those questions documented somewhere? If so, then the documentation for this option should link to that discussion (and vice-versa). If not, then those questions should be answered by this documentation.