From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 4937C1FA12 for ; Tue, 20 Jul 2021 14:28:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237538AbhGTNrN (ORCPT ); Tue, 20 Jul 2021 09:47:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236833AbhGTNlC (ORCPT ); Tue, 20 Jul 2021 09:41:02 -0400 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 383ABC0613E2 for ; Tue, 20 Jul 2021 07:20:33 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id d12so26164230wre.13 for ; Tue, 20 Jul 2021 07:20:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=J88YFK6ylPURcROMeIxWA75C316Fk0eBX66S+3poqK8=; b=BnZFAIkEa7ABRdX6S60Y7Aea/G/cwmn37x2Kwg8cNEWKlEzVYBbLtyMS69iGOlVFAr NIJ/NMY8RHlJQ4yPEY1fIQiSJN4Quk6Urb0z77CCpccXKQkClpREGFZR0SHkjMWlTZgs Swi698cKWjet0Lhigm8U7hQq7dGpppmrE7+0ISeyCJmROYfKjwAGvfHsFxG8oqTudcbE hzFs4N7xDtfUFas+5yB2OpSQwefpi+GTU2M0W4IZdmyDBqMVAsH/hu4Nx83xEyLmEXX6 SfXba1dKfZwsOJkps6DH3tDEQukWB9M3BgV0va5/x07GuJ+GGXMypD/rSGcSIQTMZWbp bBcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J88YFK6ylPURcROMeIxWA75C316Fk0eBX66S+3poqK8=; b=UfYvqoZLeedZ9bGXrH6XwI7dHMv6Tsf/zryMU7uWjPaAXba+U5NDnobMuMxcrrs/tH DWBkGVlgxWb0HOP4iMMmagIggmJRcqcfIBdNaDYKDwX1to/0Ht/KH32gQ5y7f7hgLeZy 3/jLIFvUlzEv+j/AiIbNb3wERfRxiN0BqSMi9lhwRi2luDA2utDdFp1YCKUu73mbfw4Y tulSN/J8DAc3+ezvLOGlcUHyqnWfXjFGCycaxdtm3b3BHcr9cvHwKQ64yjw4A6CsEnVt y6HwrIhVMqJ0if8rEfd1oJSsVoNUQ3cVRbXq6u91QEIIrODzxPbJ4lXHBlmPQtijnINy zBBA== X-Gm-Message-State: AOAM5305ZX8DCOxPxammE1oXZYTL2a5tNdGVe2RElfbx11rrtxiP4CFK iggzepyzExdcEjkHK6FylPFI9HHAqDWGqQ== X-Google-Smtp-Source: ABdhPJywdQ2axr5rlzYm+rZBIjCn7iQqXUwEP7F1vkJxNItOzYgfw2+7i1/tzIDC+GwFScJLVTi4sw== X-Received: by 2002:a5d:6d88:: with SMTP id l8mr28260189wrs.301.1626790830376; Tue, 20 Jul 2021 07:20:30 -0700 (PDT) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id c2sm23785370wrn.28.2021.07.20.07.20.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 07:20:29 -0700 (PDT) From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= To: git@vger.kernel.org Cc: Junio C Hamano , Johannes Schindelin , =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Subject: [PATCH v6 1/3] bundle doc: rewrite the "DESCRIPTION" section Date: Tue, 20 Jul 2021 16:20:24 +0200 Message-Id: X-Mailer: git-send-email 2.32.0.874.ge7a9d58bfcf In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Rewrite the "DESCRIPTION" section for "git bundle" to start by talking about what bundles are in general terms, rather than diving directly into one example of what they might be used for. This changes documentation that's been substantially the same ever since the command was added in 2e0afafebd8 (Add git-bundle: move objects and references by archive, 2007-02-22). I've split up the DESCRIPTION into that section and a "BUNDLE FORMAT" section, it briefly discusses the format, but then links to the technical/bundle-format.txt documentation. The "the user must specify a basis" part of this is discussed below in "SPECIFYING REFERENCES", and will be further elaborated on in a subsequent commit. So I'm removing that part and letting the mention of "revision exclusions" suffice. There was a discussion about whether to say anything at all about "thin packs" here[1]. I think it's good to mention it for the curious reader willing to read the technical docs, but let's explicitly say that there's no "thick pack", and that the difference shouldn't matter. 1. http://lore.kernel.org/git/xmqqk0mbt5rj.fsf@gitster.g Signed-off-by: Ævar Arnfjörð Bjarmason --- Documentation/git-bundle.txt | 57 ++++++++++++++++++++++++++---------- 1 file changed, 42 insertions(+), 15 deletions(-) diff --git a/Documentation/git-bundle.txt b/Documentation/git-bundle.txt index 53804cad4b6..9c743aed49f 100644 --- a/Documentation/git-bundle.txt +++ b/Documentation/git-bundle.txt @@ -18,21 +18,48 @@ SYNOPSIS 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. - -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 -destination repository. +Create, unpack, and manipulate "bundle" files. Bundles are used for +the "offline" transfer of Git objects without an active "server" +sitting on the other side of the network connection. + +They can be used to create both incremental and full backups of a +repository, and to relay the state of the references in one repository +to another. + +Git commands that fetch or otherwise "read" via protocols such as +`ssh://` and `https://` can also operate on bundle files. It is +possible linkgit:git-clone[1] a new repository from a bundle, to use +linkgit:git-fetch[1] to fetch from one, and to list the references +contained within it with linkgit:git-ls-remote[1]. There's no +corresponding "write" support, i.e.a 'git push' into a bundle is not +supported. + +See the "EXAMPLES" section below for examples of how to use bundles. + +BUNDLE FORMAT +------------- + +Bundles are `.pack` files (see linkgit:git-pack-objects[1]) with a +header indicating what references are contained within the bundle. The +header is (mostly) in the format emitted by linkgit:git-show-ref[1]. + +Like the the packed archive format itself bundles can either be +self-contained, or be created using exclusions. + +Bundles created using revision exclusions are "thin packs" created +using the `--thin` option to linkgit:git-pack-objects[1], and +unbundled using the `--fix-thin` option to linkgit:git-index-pack[1]. + +There is no option to create a "thick pack" when using revision +exclusions, users should not be concerned about the difference. By +using "thin packs" bundles created using exclusions are smaller in +size. That they're "thin" under the hood is merely noted here as a +curiosity, and as a reference to other documentation + +See link:technical/bundle-format.html[the `bundle-format` +documentation] for more details and the discussion of "thin pack" in +link:technical/pack-format.html[the pack format documentation] for +further details. OPTIONS ------- -- 2.32.0.874.ge7a9d58bfcf