Re: [PATCH 4/7] read-cache: set sparsity when index is new

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

 



"Victoria Dye via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:

> From: Victoria Dye <vdye@xxxxxxxxxx>
>
> When the index read in 'do_read_index()' does not exist on-disk, mark the
> index "sparse" if the executing command does not require a full index and
> sparse index is otherwise enabled.
>
> Some commands (such as 'git stash -u') implicitly create a new index (when
> the 'GIT_INDEX_FILE' variable points to a non-existent file) and perform
> some operation on it. However, when this index is created, it isn't created
> with the same sparsity settings as the repo index. As a result, while these
> indexes may be sparse during the operation, they are always expanded before
> being written to disk. We can avoid that expansion by defaulting the index
> to "sparse", in which case it will only be expanded if the full index is
> needed.

Makes sense.



[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]

  Powered by Linux