Re: [PATCH v9 33/41] environment: add set_index_file()

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

 



On Mon, Aug 1, 2016 at 10:40 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Junio C Hamano <gitster@xxxxxxxxx> writes:
>
>> Stefan Beller <sbeller@xxxxxxxxxx> writes:
>>
>>> In cache.h we have a NO_THE_INDEX_COMPATIBILITY_MACROS,
>>> and lots of
>>>   #define foo_bar(..) frob_bar(&the_index, (..))
>>>
>>> Could you operate on the raw functions that take pointers to &the_index
>>> and point these to a temporary index?
>>
>> Isn't mention of the_index is a red-herring?
>>
>> The in-core index_state does not even know what file it needs to be
>> written to, so whether you explicitly specify your own index or use
>> the compat macros to access the_index, you would need to specify to
>> which file you would write it out or from which file you would read
>> the new contents.
>
> Having said that, I agree with you that the cop-out "Yes we know
> this is bad" needs a lot more clarification, pointing out what issue
> this side-steps and a direction to solve it correctly.

I am ok to add more explanations like those in my answer to Stefan in
the commit message, and also to add a warning comment in cache.h, but
I am not sure I know really well how to solve these issues correctly.
So I am not sure what I could add about that, except perhaps that it
is an other project to fix these issues and that it should start by
fixing them in other core libified code like dir.c and diff.c.

Do you want me to resend everything, or is it ok if I just resend the
last 9 patches in the series, so starting from this patch (32/41)?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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