Re: [PATCH v2 01/14] t3705: test that 'sparse_entry' is unstaged

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

 



On 9/15/2021 12:32 PM, Matheus Tavares wrote:
> On Sun, Sep 12, 2021 at 10:23 AM Derrick Stolee via GitGitGadget
> <gitgitgadget@xxxxxxxxx> wrote:
>>
>> From: Derrick Stolee <dstolee@xxxxxxxxxxxxx>
>>
>> The tests in t3705-add-sparse-checkout.sh check to see how 'git add'
>> behaves with paths outside the sparse-checkout definition. These
>> currently check to see if a given warning is present but not that the
>> index is not updated with the sparse entries.
> 
> Hmm, I probably missed something, but don't we already check that with
> the `test_sparse_entry_unchanged` helper? The only test case that we
> don't call it is 'git add --refresh does not update sparse entries',
> but we explicitly compare the cached 'mtime' from before and after
> `git add` there.

test_sparse_entry_unchanged does a bit more by actually
requiring that we fully know the mode and OID of the object
in the index. 

Since some of the tests modify sparse_entry and then update
the index using the --sparse option (including a mode change
with --chmod=x), it seems more robust to avoid an exact
match from ls-files.

Thanks,
-Stolee



[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