Thread (8 messages) flat view 8 messages, 5 authors, 2016-06-15

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

From: Philip Oakley <hidden>
Date: 2016-06-15 22:56:10

From: "Alain Kalker" <redacted>
Sent: Sunday, February 17, 2013 1:01 PM
On Fri, 15 Feb 2013 23:01:09 -0500, Jeff King wrote:
quoted
On Sat, Feb 16, 2013 at 12:03:58AM +0000, Alain Kalker wrote:
quoted
---test.sh---
#!/bin/sh
[...]
quoted
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.
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help