From: Philip Oakley Date: Sun, 17 Feb 2013 17:46:31 GMT Subject: Re: [BUG] Git clone of a bundle fails, but works (somewhat) when run with strace Message-ID: <20C7ED1EA37C4EECA28070D1483C57B7@PhilipOakley> In-Reply-To: From: "Alain Kalker" Sent: Sunday, February 17, 2013 1:01 PM > 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 [...] >> >> 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. > >> >> 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 >