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
AKAlain Kalker <a.c.kalker@gmail.com>
Date
Feb 16, 2013, 00:03 UTC
Message-ID
<kfmide$4ro$3@ger.gmane.org>
In-Reply-To
<kfmclb$4ro$2@ger.gmane.org>
On Fri, 15 Feb 2013 22:25:47 +0000, Alain Kalker wrote:
Show 18 quoted lines
> On Fri, 15 Feb 2013 20:33:24 +0100, Alain Kalker wrote:
> 
>> 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.

After trying to bisect this using `bisect start; bisect good v1.5.1; git bisect bad HEAD; git bisect run ..test.sh`:

---test.sh--- #!/bin/sh

make clean make || return 125 GIT=$(pwd)/git

cd /tmp rm -rf testrepo mkdir testrepo cd testrepo $GIT init echo test > test.txt $GIT add test.txt $GIT commit -m "Add test.txt" $GIT bundle create ../testrepo.bundle master || return 125 cd ..

rm -rf testrepofrombundle $GIT clone testrepo.bundle testrepofrombundle || return 1 --- I was unable to find a bad revision. After a lot more searching I found that I had `git` aliased to `hub`, a tool used to make Github actions easier. Eliminating `hub` from the equation resolved most problems. The only ones remaining are the confusing error message from `git bundle create` and the "missing HEAD" (you can interpret that in different ways) ;-)

P.S. I hereby promise to _never_ _ever_ alias `git` to something else and then post a Git bug about that "something else" on this ML.

Sorry to have wasted your time,
Alain
Previous: Alain KalkerNext: Junio C Hamano
Message 3 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.