From: Patrick Steinhardt Date: Wed, 07 Jan 2026 10:05:26 GMT Subject: Re: [PATCH 4/9] fetch: make filter_options local to cmd_fetch() Message-ID: In-Reply-To: <20251223111113.47473-5-christian.couder@gmail.com> On Tue, Dec 23, 2025 at 12:11:08PM +0100, Christian Couder wrote: > The `struct list_objects_filter_options filter_options` variable used > in "builtin/fetch.c" to store the parsed filters specified by > `--filter=` is currently a static variable global to the > file. > > As we are going to use it more in a following commit, it could become a > bit less easy to understand how it's managed. > > To avoid that, let's make it clear that it's owned by cmd_fetch() by > moving its definition into that function and making it non-static. > > This requires passing a pointer to it through the prepare_transport(), > do_fetch(), backfill_tags(), fetch_one_setup_partial(), and fetch_one() > functions, but it's quite straightforward. Nice cleanups. I'm always happy to see less global state. Patrick