From patchwork Mon Sep 2 12:13:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xing Xin X-Patchwork-Id: 13787209 Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F23219E98D for ; Mon, 2 Sep 2024 12:14:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725279246; cv=none; b=qxDDsTblhDncKnvewh4yzqdR+QTwGB9Y0xUueGGpq2cT1AkDk+6vnsXlCl73hVGXk2hOX5UYNQKG9YbzD1SDl3ULSGy07Dky0bvE3ZHzMlQG/I3/ZSEK8yZ2gIGOl0BpwZLFwJcI3tuXh2i4S0rZ1lMDQ23b8WQ0heHgJYjPORs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725279246; c=relaxed/simple; bh=2AleUzX4KNTb1yimu4w4tptABuaI3Vn6zOpW0s3aLsA=; h=Message-Id:In-Reply-To:References:From:Date:Subject:Content-Type: MIME-Version:To:Cc; b=hgyc32YjNOC2jP/koqIq3iibbRhQx22Pv30vNQ7780L5L/GO6irCnLn2AAWHLF1X6uXy0duklLHvmCP3gH7XNblOyac4pJilCf8enCUYQGohnWJH7GAZwy3TG59Qr15kYKfJuXpgTz/bb9PpKccLDdQgwRW2p71TSplO1XKolU4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ntAsAB8j; arc=none smtp.client-ip=209.85.208.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ntAsAB8j" Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-5bede548f7cso4185880a12.2 for ; Mon, 02 Sep 2024 05:14:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725279242; x=1725884042; darn=vger.kernel.org; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=Tf8pnEwTEFVQPc4gf21xDNxUWTveihY816B6E/0WvoI=; b=ntAsAB8jtanI3HS97OWt96CmDvDsn1lWO6DfqNBssxovkZXNL20mSFH5GHzruIN+6k mD0Nw/3t9LanBg9Ge6+niEPADrRxpB94elmWQpw/vBFr7rtQnGk/4Js8HGqLzxh9YGSa 6DMVY7BNUPGtwfRnoEmf7NCOXEOPcO5JtS9xwyz6+Am7IzLQJ5uaxTCdzW4nz+Y3qE/E koOfRgAqyRSvGvIoUz8SpyRkS36yyN77ndgljTexoO8iqJ9ysuUU9I3/YBz/Aupf8dOU 5qgZPAF1fcNpXVYpiC5dTP93Wjdr0qb/l1z7z++lbbKEb10zAlOYe+fKFAWIu4Tug8Up pdsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725279242; x=1725884042; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Tf8pnEwTEFVQPc4gf21xDNxUWTveihY816B6E/0WvoI=; b=Nxj+9rY3T7sXUwE91WVBCJkbsgWdHsiNnOmM8ODwCC+fWdGI4eAnHATFoWjZ1IvPJH kNBes5oPvUFuBhLJ3oKSUXIUVuw2WSSBTexY1E+TqIVOKWpbePypzCPp/vSpqB2Pb7ZB TQZQfyzl+XatK3ptKps0oneVyZRPsGFmgpQlNpATrwGg8krfMLL4Wnb0k3Et6b/4VU/q ZPJ3uCQ7nOez+9lzLstHfrZw98UOLgdyBreA3SFcAYB7JjGkil/9DghvAsKXvbKbEByn TkCSI1/mmAMb5Lja78APcTlEVw+/Vb+rNoC2oUfC1z7Q7EjX3SBhCC62WsOuQnM6w3Yg SDNQ== X-Gm-Message-State: AOJu0YwSCtPb4q22DdjfHJofjngK6stigXMeY1Al25+mk+vTlGTqJ1xi l8m9XER/vgtPP43P9wVIAc0j1+sLNlv26eE7eSajEBqKUkMRouzpvqNw/w== X-Google-Smtp-Source: AGHT+IHcsUrZkDZBrOzFSp1T++9KkMjNkJq2mTQs2et+0/OwDmq0a78YBjAviWSCIduUSc2SBiE/EA== X-Received: by 2002:a17:907:868a:b0:a86:8d83:542d with SMTP id a640c23a62f3a-a89b96f6feamr531408966b.45.1725279241727; Mon, 02 Sep 2024 05:14:01 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a89892335b2sm547649266b.217.2024.09.02.05.14.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Sep 2024 05:14:01 -0700 (PDT) Message-Id: <8962031f9997c4030cf32652908fc431f3bf9976.1725279236.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Mon, 02 Sep 2024 12:13:56 +0000 Subject: [PATCH 4/4] builtin/ls-remote.c: recognize fetch.serverOption configuration Fcc: Sent Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 To: git@vger.kernel.org Cc: Brandon Williams , Jonathan Tan , blanet , Xing Xin From: Xing Xin From: Xing Xin Teach git-ls-remote to recognize the `fetch.serverOption` configuration as a default list of server options to send for Git protocol v2, if server options are not explicitly set via the command line. Tests and documentation have been updated accordingly. Signed-off-by: Xing Xin --- Documentation/git-ls-remote.txt | 3 +++ builtin/ls-remote.c | 32 ++++++++++++++++++++++++++++---- t/t5702-protocol-v2.sh | 29 ++++++++++++++++++++++++----- 3 files changed, 55 insertions(+), 9 deletions(-) diff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt index 76c86c3ce4f..fc9930193f8 100644 --- a/Documentation/git-ls-remote.txt +++ b/Documentation/git-ls-remote.txt @@ -81,6 +81,9 @@ OPTIONS character. When multiple `--server-option=