Re: [PATCH v6 17/19] fsck: Introduce `git fsck --quick`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/19/2015 10:53 PM, Junio C Hamano wrote:
> Johannes Schindelin <johannes.schindelin@xxxxxx> writes:
> 
>> Can you think of a name for the option that is as short as `--quick`
>> but means the same as `--connectivity-only`?
> 
> No I can't.  I think `--connectivity-only` is a very good name that
> is unfortunately a mouthful, I agree that we need a name that is as
> short as `--xxxxx` that means the same as `--connectivity-only`.  I
> do not think `--quick` is that word; it does not mean such a thing.

`--connectivity-only` says that "of all the things that fsck can do,
skip everything except for the connectivity check". But the switch
really affects not the connectivity part of the checks (that part is
done in either case), but the blob part. So, if we ignore the length of
the option name for a moment, it seems like the options should be
something like `--check-blob-integrity`/`--no-check-blob-integrity`. The
default would remain `--check-blob-integrity` of course, but

* Someday there might be a config setting that people can use to change
the default behavior of fsck to `--no-check-blob-integrity`.
* Someday there might be other expensive types of checks [1] that we
want to turn on/off independent of blob integrity checks.

But now that I'm writing this, a silly question occurs to me: Do we need
an overall option like this at all? If I demote all blob-integrity
checks to "ignore" via the mechanism that you have added, then shouldn't
fsck automatically detect that it doesn't have to open the blobs at all
and enable this speedup automatically? So maybe
`--(no-)?check-blob-integrity` is actually a shorthand for turning a few
more specific checks on/off at once.

As for thinking of a shorter name for the option: assuming the blob
integrity checks can be turned on and off independently as described
above, then I think it is reasonable to *also* add a `--quick` option
defined as

--quick: Skip some expensive checks, dramatically reducing the
    runtime of `git fsck`. Currently this is equivalent to
    `--no-check-blob-integrity`.

In the future if we invent other expensive checks we might also add them
to the list of things that are skipped by `--quick`.

Michael

[1] For example, if LFS or something like it every became part of
standard Git, one could imagine a super-expensive
`--check-lfs-object-availability` check that would would default to OFF
but sometimes turn on by hand.

-- 
Michael Haggerty
mhagger@xxxxxxxxxxxx

--
To unsubscribe from this list: send the line "unsubscribe git" in



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]