From: Alain Kalker <a.c.kalker@gmail.com>
To: git@vger.kernel.org
Subject: [BUG] Git clone of a bundle fails, but works (somewhat) when run with strace
Date: Fri, 15 Feb 2013 20:33:24 +0100 [thread overview]
Message-ID: <511E8D84.6060601@gmail.com> (raw)
tl;dr:
- `git bundle create` without <git-rev-list-args> gives git rev-list
help, then dies.
Should point out missing <git-rev-list-args> instead.
- `git clone <bundle> <dir> gives "ERROR: Repository not found."
- `strace ... git clone <bundle> <dir>` (magically) appears to work but
cannot checkout files b/c of nonexistent ref.
- Heisenbug? Race condition?
- Zaphod Beeblebrox has left the building, sulking.
Full description:
When I try to clone from a bundle created from a local repository, `git
clone <bundle> <dir>` fails with: "ERROR: Repository not found. fatal:
Could not read from remote repository." unless I run it with strace.
OS: Arch Linux (rolling release)
Git versions: 1.8.1.3 and git://github.com/git.git master@02339dd
Steps to reproduce:
$ # Clone the Linux kernel repository
$ git clone git://github.com/torvalds/linux.git
Cloning into 'linux'...
remote: Counting objects: 2841147, done.
remote: Compressing objects: 100% (670736/670736), done.
remote: Total 2841147 (delta 2308339), reused 2657487 (delta 2143012)
Receiving objects: 100% (2841147/2841147), 797.62 MiB | 2.59 MiB/s, done.
Resolving deltas: 100% (2308339/2308339), done.
Checking out files: 100% (41521/41521), done.
$ cd linux
$ git branch -av
* master 323a72d Merge
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
remotes/origin/HEAD -> origin/master
remotes/origin/master 323a72d Merge
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
$ # Try to create a bundle
$ git bundle create ../linux.bundle
usage: git rev-list [OPTION] <commit-id>... [ -- paths... ]
limiting output:
--max-count=<n>
--max-age=<epoch>
--min-age=<epoch>
--sparse
--no-merges
--min-parents=<n>
--no-min-parents
--max-parents=<n>
--no-max-parents
--remove-empty
--all
--branches
--tags
--remotes
--stdin
--quiet
ordering output:
--topo-order
--date-order
--reverse
formatting output:
--parents
--children
--objects | --objects-edge
--unpacked
--header | --pretty
--abbrev=<n> | --no-abbrev
--abbrev-commit
--left-right
special purpose:
--bisect
--bisect-vars
--bisect-all
error: rev-list died
$ # IMHO the error should refer to the usage of `git bundle` with a
proper basis, not `git rev-list`.
$ # Also nothing should die loudly because of a missing parameter.
$ git bundle create ../linux.bundle master
Counting objects: 2836191, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (505627/505627), done.
Writing objects: 100% (2836191/2836191), 796.59 MiB | 16.23 MiB/s, done.
Total 2836191 (delta 2304454), reused 2834391 (delta 2303193)
$ # Try to clone a new repository from the bundle
$ cd ..
$ git clone linux.bundle linuxfrombundle
Cloning into 'linuxfrombundle'...
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
$ git clone linux.bundle -b master linuxfrombundle
Cloning into 'linuxfrombundle'...
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
# Try again using strace
$ # (Replace /dev/null with a filename if you really want to try and
debug this, or if you just want to torture your hard drive ;) )
$ strace -o /dev/null git clone linux.bundle linuxfrombundle
Cloning into 'linuxfrombundle'...
Receiving objects: 100% (2836191/2836191), 796.59 MiB | 24.64 MiB/s, done.
Resolving deltas: 100% (2304454/2304454), done.
warning: remote HEAD refers to nonexistent ref, unable to checkout.
$ # Let's have a look at what we cloned
$ cd linuxfrombundle
$ ls
$ git branch -av
remotes/origin/master 323a72d Merge
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
$ git checkout master
Checking out files: 100% (41521/41521), done.
Branch master set up to track remote branch master from origin.
Already on 'master'
$ git branch -av
* master 323a72d Merge
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
remotes/origin/master 323a72d Merge
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
$ # Where's my HEAD?
Kind regards,
Alain Kalker
next reply other threads:[~2013-02-15 19:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-15 19:33 Alain Kalker [this message]
2013-02-15 22:25 ` [BUG] Git clone of a bundle fails, but works (somewhat) when run with strace Alain Kalker
2013-02-16 0:03 ` Alain Kalker
2013-02-16 0:09 ` Junio C Hamano
2013-02-16 4:01 ` Jeff King
2013-02-17 13:01 ` Alain Kalker
2013-02-17 18:04 ` Philip Oakley
2013-02-25 6:59 ` Junio C Hamano
2014-05-28 15:59 ` Bram Geron
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=511E8D84.6060601@gmail.com \
--to=a.c.kalker@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.