Re: [GSOC PATCH v2 2/2] attr: use `repo_settings_get_attributesfile_path()` and update callers

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

 



shejialuo <shejialuo@xxxxxxxxx> writes:

>> -static void bootstrap_attr_stack(struct index_state *istate,
>> +static void bootstrap_attr_stack(struct repository *repo, struct index_state *istate,
>
> I have scanned the definition of the "struct index_state", there is a
> "struct repository *repo" member in this data structure. This makes me
> think why do we need to pass the "struct repository *repo" in the first
> place. A design question, should we just use `istate->repo` directly?

Good thing to notice.

As the attribute system is all about giving extra information on the
paths that appear in the index and in the working tree, it may make
sense for the API to go from the index state which is about the
index and the working tree to access the attributes, rather than
from the repository structure, which controls a lot wider concept
and moving anything and everything there will easily and quickly
make it a messy kitchen sink.





[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