Re: [PATCH v3] describe: enable sparse index for describe

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

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> "Raghul Nanth A via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:
>
>> From: Raghul Nanth A <nanth.raghul@xxxxxxxxx>
>>
>> Add usage and performance tests for describe
>
> I think this sentence can easily go.
>
>> Describe uses the index when it is run with --dirty flag, which uses the
>> run_diff_index commmand. The command is sparse-index aware and hence we
>> can just set the requires-full-index to false
>
> End the sentence with full-stop.  More importantly, it would be
> nicer to have something to substantiate the "this is sparse aware"
> claim here, something like "since commit X" or "as shown in the test
> tXXXX.YY".

With a bit of digging into the history, I think the topic that was
merged at 8d2c3732 (Merge branch 'ld/sparse-diff-blame', 2021-12-21)
made various modes of "git diff" to be sparse-index aware.  t1092
has tests for "git diff --cached", which uses the same machinery.

    Subject: [PATCH] describe: make it sparse-index aware

    "git describe" needs to compare the index and the working tree
    when (and only when) it is run with the "--dirty" flag.  This is
    done by calling the run_diff_index() function, which has been
    already made aware of the sparse-index in the series that led to
    8d2c3732 (Merge branch 'ld/sparse-diff-blame', 2021-12-21).
    t1092 has tests for "git diff --cached", which uses this exact
    machinery.

    Mark "git describe" that the command does not require the index
    to be expanded fully beforehand.

or something like that.

> Updated tests do look good, and the code change is of course minimal
> and to the point, which is also good.

Thanks.



[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