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

Re: [BUG] Git clone of a bundle fails, but works (somewhat) when run with strace

From
Philip Oakley <philipoakley@iee.org>
Date
Feb 17, 2013, 17:46 UTC
Message-ID
<20C7ED1EA37C4EECA28070D1483C57B7@PhilipOakley>
In-Reply-To
<kfqkak$ugv$1@ger.gmane.org>
From: "Alain Kalker" <a.c.kalker@gmail.com>
Sent: Sunday, February 17, 2013 1:01 PM
Show 6 quoted lines
> On Fri, 15 Feb 2013 23:01:09 -0500, Jeff King wrote:
>
>> On Sat, Feb 16, 2013 at 12:03:58AM +0000, Alain Kalker wrote:
>>
>>> ---test.sh---
>>> #!/bin/sh
[...]
Show 16 quoted lines
>>
>> but that warning makes sense. You did not create a bundle that 
>> contains
>> HEAD, therefore when we clone it, we do not know what to point HEAD 
>> to.
>> You probably wanted "git bundle create ../repo.bundle --all" which
>> includes both "master" and "HEAD".
>
> That explains it, thanks! Maybe this could be added as an example to 
> the
> documentation for `git bundle`? People looking at `man git-bundle` 
> hoping
> to use it as one possible way to make a backup of a Git repository 
> might
> not realize right away that --all is the way to specify all refs, like
> with `git log`.

I had posted a documentation patch back in Setemeber last year, http://thread.gmane.org/gmane.comp.version-control.git/205887/focus=205897, however Junio highlighted some additional concerns that I wasn't able to respond to at the time.

It may be worth resurrecting once the concerns have been addressed.
Show 29 quoted lines
>
>>
>> It would be slightly more accurate to say "the remote HEAD does not
>> exist", rather than "refers to nonexistent ref".  It would perhaps be
>> nicer still for "git clone" to make a guess about the correct HEAD 
>> when
>> one is not present (especially in the single-branch case, it is easy 
>> to
>> make the right guess).
>>
>> Patches welcome. In the meantime, you can clone with "-b master" to 
>> tell
>> it explicitly, or you can "git checkout master" inside the 
>> newly-cloned
>> repository.
>
> Thanks again for your help, very welcome :-)
>
> Alain
>
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2013.0.2899 / Virus Database: 2639/6108 - Release Date: 
> 02/16/13
> 
Previous: Alain KalkerNext: Junio C Hamano
Message 7 of 9 in “[BUG] Git clone of a bundle fails, but works (somewhat) when run with strace”
  1. Alain KalkerFeb 15, 2013
  2. Alain KalkerFeb 15, 2013
  3. Alain KalkerFeb 16, 2013
  4. Junio C HamanoFeb 16, 2013
  5. Jeff KingFeb 16, 2013
  6. Alain KalkerFeb 17, 2013
  7. Philip OakleyFeb 17, 2013
  8. Junio C HamanoFeb 25, 2013
  9. Bram GeronMay 28, 2014

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.