From: Patrick Steinhardt Date: Mon, 07 Oct 2024 08:22:36 GMT Subject: Re: [PATCH v2 4/5] fetch: respect --server-option when fetching multiple remotes Message-ID: In-Reply-To: <39ee8dbef783f425e6a8b01a68ac01fde304b698.1727093878.git.gitgitgadget@gmail.com> On Mon, Sep 23, 2024 at 12:17:57PM +0000, Xing Xin via GitGitGadget wrote: > From: Xing Xin > > Fix an issue where server options specified via the command line > (`--server-option` or `-o`) were not sent when fetching from multiple > remotes using Git protocol v2. > > To reproduce the issue with a repository containing multiple remotes: > > GIT_TRACE_PACKET=1 git -c protocol.version=2 fetch --server-option=demo --all > > Observe that no server options are sent to any remote. > > The root cause was identified in `builtin/fetch.c:fetch_multiple`, which > is invoked when fetching from more than one remote. This function forks > a `git-fetch` subprocess for each remote but did not include the > specified server options in the subprocess arguments. > > This commit ensures that command-line specified server options are > properly passed to each subprocess. Relevant tests have been added. Nice catch. Patrick