On Mon, Sep 23, 2024 at 12:17:57PM +0000, Xing Xin via GitGitGadget wrote: > From: Xing Xin <xingxin.xx@xxxxxxxxxxxxx> > > 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