From patchwork Fri Oct 18 15:15:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip Oakley X-Patchwork-Id: 11198663 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CA0BC13BD for ; Fri, 18 Oct 2019 15:16:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B110B222BD for ; Fri, 18 Oct 2019 15:16:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2442415AbfJRPQF (ORCPT ); Fri, 18 Oct 2019 11:16:05 -0400 Received: from smtp-out-5.talktalk.net ([62.24.135.69]:62990 "EHLO smtp-out-5.talktalk.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727297AbfJRPQF (ORCPT ); Fri, 18 Oct 2019 11:16:05 -0400 Received: from localhost.localdomain ([92.30.121.54]) by smtp.talktalk.net with SMTP id LTyziQNMYWIpcLTyzidjVW; Fri, 18 Oct 2019 16:16:02 +0100 X-Originating-IP: [92.30.121.54] X-Spam: 0 X-OAuthority: v=2.3 cv=W6NGqiek c=1 sm=1 tr=0 a=/cLN2YrzNMz5fcHgWq8JfQ==:117 a=/cLN2YrzNMz5fcHgWq8JfQ==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=ldyaYNNxDcoA:10 a=ZZnuYtJkoWoA:10 a=xtxXYLxNAAAA:8 a=DW29gNylpxWPYbZ9eGUA:9 a=xts0dhWdiJbonKbuqhAr:22 a=pHzHmUro8NiASowvMSCR:22 a=Ew2E2A-JSTLzCXPT_086:22 From: Philip Oakley To: GitList , Jeff King , Junio C Hamano Cc: Philip Oakley , Philip Oakley Subject: [PATCH v3] Doc: Bundle file usage Date: Fri, 18 Oct 2019 16:15:55 +0100 Message-Id: <20191018151555.2277-1-philipoakley@iee.email> X-Mailer: git-send-email 2.23.0.windows.1.21.g947f504ebe8.dirty In-Reply-To: <20191016210957.GA28981@sigill.intra.peff.net> References: <20191016210957.GA28981@sigill.intra.peff.net> MIME-Version: 1.0 X-CMAE-Envelope: MS4wfPTPwmerZEv7ej0qNbvV6dOVaEtTocEzm9uYBPjTT8J1T8OHA6gCAgY8c1WjxOiuKspMvXa64CeBPSyUFQgStUFVVfenH1wOdYHR5qRHuxeMv7Blz6EE OBmvjHqGdR75+58S+vp+ERxe4OYWTyMSCUebiXEDA6cXiA50LMhFSxRqek8C124yVvn5F/fmlHccTFsJC8Rk5DGM0cYZjlZIT3UiSYSGIa17C+ekvg/+9M20 hJT8DKMG1D1MGKNsCtgJC3Z04S5DMXjfyWsEeD2GyA//sXTvwuHda5xZCrC7em5x Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Philip Oakley Improve the command description, including paragraph spacing. Git URLs can accept bundle files for fetch, pull and clone, include in that section. Include git clone in the bundle usage description. Correct the quoting of . Detail the options for cloning a complete repo. Signed-off-by: Philip Oakley --- The new paragraph uses the more modern back-ticks while elsewhere the quote style is matched locally. Includes peff's suggestions. --- Documentation/git-bundle.txt | 23 +++++++++++++++++------ Documentation/urls.txt | 3 +++ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/Documentation/git-bundle.txt b/Documentation/git-bundle.txt index 7d6c9dcd17..a441a13d58 100644 --- a/Documentation/git-bundle.txt +++ b/Documentation/git-bundle.txt @@ -20,11 +20,14 @@ DESCRIPTION Some workflows require that one or more branches of development on one machine be replicated on another machine, but the two machines cannot be directly connected, and therefore the interactive Git protocols (git, -ssh, http) cannot be used. This command provides support for -'git fetch' and 'git pull' to operate by packaging objects and references -in an archive at the originating machine, then importing those into -another repository using 'git fetch' and 'git pull' -after moving the archive by some means (e.g., by sneakernet). As no +ssh, http) cannot be used. + +The 'git bundle' command packages objects and references in an archive +at the originating machine, which can then be imported into another +repository using 'git fetch', 'git pull', or 'git clone', +after moving the archive by some means (e.g., by sneakernet). + +As no direct connection between the repositories exists, the user must specify a basis for the bundle that is held by the destination repository: the bundle assumes that all objects in the basis are already in the @@ -35,7 +38,7 @@ OPTIONS create :: Used to create a bundle named 'file'. This requires the - 'git-rev-list-args' arguments to define the bundle contents. + '' arguments to define the bundle contents. verify :: Used to check that a bundle file is valid and will apply @@ -92,6 +95,14 @@ It is okay to err on the side of caution, causing the bundle file to contain objects already in the destination, as these are ignored when unpacking at the destination. +`git clone` can use any bundle created without negative refspecs +(e.g., `new`, but not `old..new`). +If you want to match `git clone --mirror`, which would clone other +refs such as `refs/remotes/*`, use `--all`. +If you want to provide the same set of refs that a clone directly +from the source repository would get, use `--branches --tags` for +the ``. + EXAMPLES -------- diff --git a/Documentation/urls.txt b/Documentation/urls.txt index bc354fe2dc..1c229d7581 100644 --- a/Documentation/urls.txt +++ b/Documentation/urls.txt @@ -53,6 +53,9 @@ These two syntaxes are mostly equivalent, except the former implies --local option. endif::git-clone[] +'git clone', 'git fetch' and 'git pull', but not 'git push', will also +accept a suitable bundle file. See linkgit:git-bundle[1]. + When Git doesn't know how to handle a certain transport protocol, it attempts to use the 'remote-' remote helper, if one exists. To explicitly request a remote helper, the following syntax