From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-11.3 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,T_DKIMWL_WL_MED,USER_IN_DEF_DKIM_WL shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id B34511F424 for ; Mon, 23 Apr 2018 22:46:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932569AbeDWWqj (ORCPT ); Mon, 23 Apr 2018 18:46:39 -0400 Received: from mail-qt0-f201.google.com ([209.85.216.201]:40596 "EHLO mail-qt0-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932565AbeDWWqh (ORCPT ); Mon, 23 Apr 2018 18:46:37 -0400 Received: by mail-qt0-f201.google.com with SMTP id t24-v6so11164793qtn.7 for ; Mon, 23 Apr 2018 15:46:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:date:in-reply-to:message-id:references:subject:from:to :cc; bh=Twt6ypFhWt3+1Gh41O14P4tytCSkdlNR5DJE9/QKWFc=; b=Nwl/PllpPOj7vvkfYB+NBRYNYD7y0Bc+h1W92sA+tO3DgESuZww6L2pzxYSYPBU1w+ K11ZJF08Pyyfe9xWdHjYETVKZEkNwCe5fpsjKu0+QlJho/q+q+tJUvOKguBg+bpkugGq fuc012tqmnSgFSZXJN8d/q5SP7ArFftEaZY8dHvAkyRxwZdeRIEHeaCej2pve2yXLqpt TMRXXKTMaOVY4b3TXX7MCC7AK/3SoQ7H5FMReWntvBK9wah7kTjWhRY4c+E61ooAXbZB YY2tCpyE5Lx9J5wgm5KfK936E1njtl4h2dcp+0nG1LzNLRSWZDMWwSWpthHDL0H8wnGA iMJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:date:in-reply-to:message-id :references:subject:from:to:cc; bh=Twt6ypFhWt3+1Gh41O14P4tytCSkdlNR5DJE9/QKWFc=; b=l16e7cFCvQAVvmk1ZwWAMDbqWzi5A2JmS9dmdb97PmZbp2naGpusLDLnQbn/QzObAQ K2Uv92Wfo2+nxJBFVOvnnZ7mNd1qvcTp7t4ocRqr2u13jIpBleAH1SOCTK+TTP6bLBBU zMG5wwRtj+uujOw0ctKRG9jpnGv5qq0sTr2blxLWpz9mL8HPn3lvuSFPeDF+dnC8dfzw NKCddkudxDQRcJs31E3c/sgU73ewjeigTOg87D3zEbX9kW0JMkPITjv6/Vf7UOJeNzbm qE4yHOXeYmXuedX6TO138BEW9qZ9rGGeDQ2KViSSOr4R1RtE2gz/klfBOg7+Fl0u6A/1 d/KA== X-Gm-Message-State: ALQs6tDvwAB7Ro87HMj/PxDL7AXokS9m6jSl9rO8UOYhOkPAbTWtqFCo d8OeutSDHiP95+SFs047a9AHavzEAPyrQoRij2k/bYUW7oi2RVHq71pFsjaDtg4G7/tE48g2ouD aWlkUJHyLQqqmzg/msS9tg4qshp0c+VzIBRtYGE9+hYvqzmrbTD8O8mj3dA== X-Google-Smtp-Source: AB8JxZrXM4+JeYjuhpf3aAcPase39ABRW4XpHmEIm+s+Sbtc9q4ZLa/mE2eYlZDGylqIkvbmWWApMEePs98= MIME-Version: 1.0 X-Received: by 2002:ac8:7246:: with SMTP id l6-v6mr10664003qtp.53.1524523596137; Mon, 23 Apr 2018 15:46:36 -0700 (PDT) Date: Mon, 23 Apr 2018 15:46:23 -0700 In-Reply-To: <20180423224624.213341-1-bmwill@google.com> Message-Id: <20180423224624.213341-3-bmwill@google.com> References: <20180423224624.213341-1-bmwill@google.com> X-Mailer: git-send-email 2.17.0.484.g0c8726318c-goog Subject: [PATCH 2/3] ls-remote: send server options when using protocol v2 From: Brandon Williams To: git@vger.kernel.org, bmwill@google.com Cc: Brandon Williams Content-Type: text/plain; charset="UTF-8" Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Teach ls-remote to optionally accept server options by specifying them on the cmdline via '-o' or '--server-option'. These server options are sent to the remote end when querying for the remote end's refs using protocol version 2. If communicating using a protocol other than v2 the provided options are ignored and not sent to the remote end. Signed-off-by: Brandon Williams --- Documentation/git-ls-remote.txt | 8 ++++++++ builtin/ls-remote.c | 4 ++++ connect.c | 9 ++++++++- remote.h | 4 +++- t/t5702-protocol-v2.sh | 16 ++++++++++++++++ transport.c | 2 +- transport.h | 6 ++++++ 7 files changed, 46 insertions(+), 3 deletions(-) diff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt index 5f2628c8f..e5defb1b2 100644 --- a/Documentation/git-ls-remote.txt +++ b/Documentation/git-ls-remote.txt @@ -60,6 +60,14 @@ OPTIONS upload-pack only shows the symref HEAD, so it will be the only one shown by ls-remote. +-o