git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Kirill Brilliantov <brilliantov@inbox.ru>
Cc: git <git@vger.kernel.org>
Subject: Re: [PATCH] Correct example restore from bundle
Date: Tue, 01 Jan 2013 12:51:13 -0800	[thread overview]
Message-ID: <7vvcbgaapq.fsf@alter.siamese.dyndns.org> (raw)
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

  reply	other threads:[~2013-01-01 20:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-01 15:26 [PATCH] Correct example restore from bundle Kirill Brilliantov
2013-01-01 20:51 ` Junio C Hamano [this message]
2013-01-01 21:07   ` [PATCH] Documentation: full-ness of a bundle is significant for cloning Junio C Hamano
2013-01-01 21:08     ` W. Trevor King
  -- strict thread matches above, loose matches on Subject: below --
2013-01-01 13:54 [PATCH] Correct example restore from bundle Kirill Brilliantov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vvcbgaapq.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=brilliantov@inbox.ru \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).