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

[BUG] Cloning with git HEAD fails for some repositories

From
Heinrich Schuchardt <xypron.glpk@gmx.de>
Date
Mar 22, 2019, 06:02 UTC
Message-ID
<017964a9-bd75-5e36-0de7-57d4467d6a7e@gmx.de>
In-Reply-To
<20190322005107.GL9937@linaro.org>
Initial cloning via
    git clone http://git.denx.de/u-boot-efi.git
fails with git version 2.21.0.196.g041f5ea1cf
git version 2.1.4 works fine.

Bisection points to this first bad commit: 17966c0a63d25b1cc2dd1e98d30873e643bd581f http: avoid disconnecting on 404s for loose objects

Please, fix the regression.
$ git clone http://git.denx.de/u-boot-efi.git
Cloning into 'u-boot-efi'...
warning: alternate disabled by http.followRedirects:
http://git.denx.de/u-boot.git/
error: Unable to find a00d15757d7a513e410f15f2f910cb52333361a3 under
http://git.denx.de/u-boot-efi.git
Cannot obtain needed object a00d15757d7a513e410f15f2f910cb52333361a3
error: fetch failed.
$ git clone git://git.denx.de/u-boot-efi.git
Cloning into 'u-boot-efi'...
remote: Counting objects: 602001, done.
remote: Compressing objects: 100% (96111/96111), done.
remote: Total 602001 (delta 498315), reused 600868 (delta 497450)
Receiving objects: 100% (602001/602001), 120.33 MiB | 11.28 MiB/s, done.
Resolving deltas: 100% (498315/498315), done.
$ cd u-boot-efi/
/u-boot-efi$ git remote remove origin
/u-boot-efi$ git remote add origin http://git.denx.de/u-boot-efi.git
/u-boot-efi$ git fetch
From http://git.denx.de/u-boot-efi
 * [new branch]            efi-2019-04 -> origin/efi-2019-04
 * [new branch]            efi-2019-07 -> origin/efi-2019-07
 * [new branch]            master      -> origin/master
/u-boot-efi$
Setting
    git config --global \
    http.http://git.denx.de/u-boot-efi.git.followRedirects true
avoids the warning but does not solve the problem:

$ git clone http://git.denx.de/u-boot-efi.git Cloning into 'u-boot-efi'... warning: adding alternate object store: http://git.denx.de/u-boot.git/ error: Unable to find a00d15757d7a513e410f15f2f910cb52333361a3 under http://git.denx.de/u-boot-efi.git Cannot obtain needed object a00d15757d7a513e410f15f2f910cb52333361a3 error: fetch failed.

Best regards
Heinrich
Next: Jeff King
Message 1 of 14 in “[BUG] Cloning with git HEAD fails for some repositories”
  1. Heinrich SchuchardtMar 22, 2019
  2. Jeff KingMar 22, 2019
  3. Wolfgang DenkMar 22, 2019
  4. Jeff KingMar 22, 2019
  5. Eric WongMar 22, 2019
  6. Heinrich SchuchardtMar 22, 2019
  7. Eric WongMar 22, 2019
  8. Heinrich SchuchardtMar 22, 2019
  9. Eric WongMar 22, 2019
  10. Jeff KingMar 23, 2019
  11. 0/3 fix dumb-http fetch with alternatesJeff King, Mar 24, 2019
  12. 1/3 http: factor out curl result code normalizationJeff King, Mar 24, 2019
  13. 2/3 http: normalize curl results for dumb loose and alternates fetchesJeff King, Mar 24, 2019
  14. 3/3 http: use normalize_curl_result() instead of manual conversionJeff King, Mar 24, 2019

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.