From: Junio C Hamano <gitster@pobox.com>
To: Tian Yuchen <cat@malon.dev>
Cc: git@vger.kernel.org, cirnovskyv@gmail.com,
Christian Couder <christian.couder@gmail.com>,
Ayush Chandekar <ayu.chandekar@gmail.com>,
Olamide Caleb Bello <belkid98@gmail.com>
Subject: Re: [PATCH v2 2/2] environment: move excludes_file into repo_config_values
Date: Fri, 26 Jun 2026 08:43:25 -0700 [thread overview]
Message-ID: <xmqqbjcx9ujm.fsf@gitster.g> (raw)
In-Reply-To: <20260626075037.532164-3-cat@malon.dev> (Tian Yuchen's message of "Fri, 26 Jun 2026 15:50:37 +0800")
Tian Yuchen <cat@malon.dev> writes:
> Continue the libification effort by moving the 'excludes_file' global
> variable into 'struct repo_config_values'.
>
> Since 'excludes_file' is a dynamically allocated string (char *), it
> requires proper memory management. Introduce repo_config_values_clear()
> to safely free the heap memory when repository instance is destroyed.
>
> Note:
>
> - 'if (repo != the_repository)' fallback logic is temporarily added
> in both the getter and the clear function. This prevents calling
> repo_config_values() on uninitialized submodules, which triggers BUG().
>
> - 'attribute_file' is another string variable that was migrated
> earlier. Its FREE_AND_NULL() call is also added to
> repo_config_values_clear().
OK. I think the placement of the new member in repo_config_values
in this round, moving to the spot next to existing attributes_file,
makes more sense than the previous round, too.
Looking good. Shall we mark it as ready for 'next' now?
next prev parent reply other threads:[~2026-06-26 15:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-26 7:50 [PATCH v2 0/2] environment: move excludes_file into repo_config_values Tian Yuchen
2026-06-26 7:50 ` [PATCH v2 1/2] dir: encapsulate excludes_file lazy-load Tian Yuchen
2026-06-26 7:50 ` [PATCH v2 2/2] environment: move excludes_file into repo_config_values Tian Yuchen
2026-06-26 15:43 ` Junio C Hamano [this message]
2026-06-26 19:12 ` Junio C Hamano
2026-06-26 15:42 ` [PATCH v2 0/2] " Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqbjcx9ujm.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=ayu.chandekar@gmail.com \
--cc=belkid98@gmail.com \
--cc=cat@malon.dev \
--cc=christian.couder@gmail.com \
--cc=cirnovskyv@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox