git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Correct example restore from bundle

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 1, 2013, 20:51 UTC
Message-ID
<7vvcbgaapq.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1357053973.22772208@f75.mail.ru>
Kirill Brilliantov <brilliantov@inbox.ru> writes:
>  ----------------
> -machineB$ git clone /home/me/tmp/file.bundle R2
> +machineB$ git clone /home/me/tmp/file.bundle R2 -b master

I think the command line should follow the convention that is suggested in "git clone -h" output, i.e.

    git clone -b master /home/me/tmp/file.bundle R2

I also think 'git bundle create" should record HEAD that points at the only branch it is packing so the person who clones from it should not say which branch, and when that is done this patch will become unnecessary, but that is a separate topic.

Thanks; I'll queue this after rewording some.
-- >8 --
From: Kirill Brilliantov <brilliantov@inbox.ru>
Date: Tue, 1 Jan 2013 17:54:44 +0400
Subject: [PATCH] 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 <brilliantov@inbox.ru>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 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 16a6b0a..5c8ba44 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
-- 
1.8.1.209.gc32ab23
Previous: Kirill BrilliantovNext: Junio C Hamano
Message 2 of 4 in “Correct example restore from bundle”
  1. Correct example restore from bundleKirill Brilliantov, Jan 1, 2013
  2. Junio C HamanoJan 1, 2013
  3. Documentation: full-ness of a bundle is significant for cloningJunio C Hamano, Jan 1, 2013
  4. W. Trevor KingJan 1, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.