From ded6aa6bdaeca5dbeb2b8811ab5d9ec419847b00 Mon Sep 17 00:00:00 2001 From: Kirill Brilliantov Date: Tue, 1 Jan 2013 17:54:44 +0400 Subject: [PATCH 1/2] Documentation: correct example restore from bundle Because the bundle created in the example does not record HEAD, "git clone" will not check out the files to the working tree: $ git clone pr.bundle q/ Cloning into 'q'... Receiving objects: 100% (619/619), 13.52 MiB | 18.74 MiB/s, done. Resolving deltas: 100% (413/413), done. warning: remote HEAD refers to nonexistent ref, unable to checkout. Avoid alarming the readers by adding "-b master" to the example. A better fix may be to arrange the bundle created in the earlier step to record HEAD, so that it can be cloned without this workaround. Signed-off-by: Brilliantov Kirill Vladimirovich Signed-off-by: Junio C Hamano --- Documentation/git-bundle.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-bundle.txt b/Documentation/git-bundle.txt index 16a6b0aceb..5c8ba44c18 100644 --- a/Documentation/git-bundle.txt +++ b/Documentation/git-bundle.txt @@ -118,7 +118,7 @@ were a remote repository instead of creating an empty repository and then pulling or fetching objects from the bundle: ---------------- -machineB$ git clone /home/me/tmp/file.bundle R2 +machineB$ git clone -b master /home/me/tmp/file.bundle R2 ---------------- This will define a remote called "origin" in the resulting repository that From b5fb4770ad132f1e3458dae61b132e335898dc9e Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 1 Jan 2013 12:46:15 -0800 Subject: [PATCH 2/2] Documentation: full-ness of a bundle is significant for cloning Not necessarily every bundle file can be cloned from. Only the ones that do not need prerequisites can. When 1d52b02 (Documentation: minor grammatical fixes and rewording in git-bundle.txt, 2009-03-22) reworded this paragraph, it lost a critical hint to tell readers why this particular bundle can be cloned from. Resurrect it. Signed-off-by: Junio C Hamano --- Documentation/git-bundle.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Documentation/git-bundle.txt b/Documentation/git-bundle.txt index 5c8ba44c18..bc023cc5f3 100644 --- a/Documentation/git-bundle.txt +++ b/Documentation/git-bundle.txt @@ -112,10 +112,9 @@ machineA$ git bundle create file.bundle master machineA$ git tag -f lastR2bundle master ---------------- -Then you transfer file.bundle to the target machine B. If you are creating -the repository on machine B, then you can clone from the bundle as if it -were a remote repository instead of creating an empty repository and then -pulling or fetching objects from the bundle: +Then you transfer file.bundle to the target machine B. Because this +bundle does not require any existing object to be extracted, you can +create a new repository on machine B by cloning from it: ---------------- machineB$ git clone -b master /home/me/tmp/file.bundle R2