From patchwork Thu Apr 11 20:30:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Tan X-Patchwork-Id: 10896773 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 96980139A for ; Thu, 11 Apr 2019 20:30:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 81B7928DF2 for ; Thu, 11 Apr 2019 20:30:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7603928DF8; Thu, 11 Apr 2019 20:30:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, USER_IN_DEF_DKIM_WL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D5CB28DF6 for ; Thu, 11 Apr 2019 20:30:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726780AbfDKUa0 (ORCPT ); Thu, 11 Apr 2019 16:30:26 -0400 Received: from mail-oi1-f202.google.com ([209.85.167.202]:43465 "EHLO mail-oi1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726748AbfDKUaZ (ORCPT ); Thu, 11 Apr 2019 16:30:25 -0400 Received: by mail-oi1-f202.google.com with SMTP id u10so3437560oie.10 for ; Thu, 11 Apr 2019 13:30:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=zN/yXJBnLA+2itMrWSSUERUXbXTQwHjdgXLrjjZpfSM=; b=uNJylTwTN1gofTWSOzraUwAq/d68YZjD0lEWJ06EBCfC9gdnnSORbb4luORoOINM2L 8YFZ7JD2R2y9+YcQnK2Cj/iQ3dud/i3ttSYTTMZqqRYsPBsCTsiZcDfw0K+JDtaDILuc 4SA53pndcFzKv+EZt6eYDYa+G6mchwxpKZn06PW5QAQQnG22x5eQvogBoa8NM0cUw/8C 7sRZSJYWV14TssvpTo07S+bdqfmbvWEAq43+WVOSnfGIsH6wSw8cG20wnnyrYwTwK/JD nGFCOZTfGrYu3cuqnCOPu2UNiFwE9yzvH0e0/Zsux/ootVabE9+CEB6P3imCYQfvltZd 1PFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=zN/yXJBnLA+2itMrWSSUERUXbXTQwHjdgXLrjjZpfSM=; b=FE8jItY1JHsKMTV0vUjwnzcmMo11/HYO3pKhVbsyPxMX75rCgYW4uBXtpRnPiyUpQa 8xkLf6QiUBlCRqPa0aKRhJQKGE6euAn6dCIfVFy34ASliLnEO1ljG5EzgqBNYkQuxr4k y5bgU6CtG0EDB2ObRiaqo8LgMCaIYMkhTyKqDJqVGEVT/3hsOet8BNtntsHkKoz5aoqk VF02BurXw+ZgAZAX8Ys3c5nC/JrByTTeL4Gd5f4mYebGKUohOBmAs8/amAsEuBc806RE StY6dBRUUG6FFXZXgR8XYzdF0Sf1lo6H1gqIkjSnZMCHHumKlG+ryU6TDMOq1SYDXL/6 zBNg== X-Gm-Message-State: APjAAAV+XeniDJOxin2EaSB2bGobsIZcfWYm/Uft6PhdbWZTTmezypU/ E/eZDzOX40p6HqoWD3/fjXAy1NWmPW8vzKrmWgjgM8OI45kYz4ZFBwgjYS12q++nzyktRKn1m6m Ah48LlWGn8TzSK6eBAAHf+GhiJghbVCKQrZCLaquBPsTLHl2NPdhEoHwESAfwV7nNaZxnuDpiI8 r7 X-Google-Smtp-Source: APXvYqzrsgStzEcNpEqqfZBq/3ij3cXCrwODUmnmhFoFQ/w5nrV3P3WgkMFTAI4wBon28jJek+Eqcyj9+9ts3V4Zk4Zo X-Received: by 2002:aca:b887:: with SMTP id i129mr4433158oif.47.1555014624182; Thu, 11 Apr 2019 13:30:24 -0700 (PDT) Date: Thu, 11 Apr 2019 13:30:16 -0700 In-Reply-To: Message-Id: Mime-Version: 1.0 References: <20190405204413.93900-1-jonathantanmy@google.com> X-Mailer: git-send-email 2.21.0.392.gf8f6787159e-goog Subject: [PATCH v3 2/2] clone: send server options when using protocol v2 From: Jonathan Tan To: git@vger.kernel.org Cc: Jonathan Tan , jrnieder@gmail.com, Junio C Hamano Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit 5e3548ef16 ("fetch: send server options when using protocol v2", 2018-04-24) taught "fetch" the ability to send server options when using protocol v2, but not "clone". This ability is triggered by "-o" or "--server-option". Teach "clone" the same ability, except that because "clone" already has "-o" for another parameter, teach "clone" only to receive "--server-option". Explain in the documentation, both for clone and for fetch, that server handling of server options are server-specific. This is similar to receive-pack's handling of push options - currently, they are just sent to hooks to interpret as they see fit. Signed-off-by: Jonathan Tan Reviewed-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/fetch-options.txt | 3 ++- Documentation/git-clone.txt | 8 ++++++++ builtin/clone.c | 6 ++++++ t/t5702-protocol-v2.sh | 22 ++++++++++++++++++++++ 4 files changed, 38 insertions(+), 1 deletion(-) diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt index fa0a3151b3..91c47752ec 100644 --- a/Documentation/fetch-options.txt +++ b/Documentation/fetch-options.txt @@ -216,7 +216,8 @@ endif::git-pull[] --server-option=