Re: [Outreachy PATCH v2] environment: move "core.attributesFile" into repo-setting
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Jan 5, 2026, 11:09 UTC
- Message-ID
- <CAOLa=ZTOKvEQaMxymi+mRcqyNy4bZ4JbK2HPtq6CeewjHMo_=g@mail.gmail.com>
- In-Reply-To
- <aVfzMsN2ouY3UBFG@ubuntu>
Olamide Caleb Bello <belkid98@gmail.com> writes: [snip]
Show 16 quoted lines
> @@ -927,8 +921,13 @@ static void bootstrap_attr_stack(struct index_state *istate,
> }
>
> /* home directory */
> - if (git_attr_global_file()) {
> - e = read_attr_from_file(git_attr_global_file(), flags);
> + if (istate && istate->repo)
> + repo = istate->repo;
> + else
> + repo = the_repository;
> + attributes_file_path = repo_settings_get_attributesfile_path(repo);
> + if (attributes_file_path) {
> + e = read_attr_from_file(attributes_file_path, flags);
> push_stack(stack, e, NULL, 0);
> }
>For my own understanding, when can `istate` be NULL?
[snip]