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

RE: Cloning an empty SHA256 remote creates a local SHA1 repo

From
MMMiljan Mitrovic <mmitrovic@bentco.biz>
Date
Apr 1, 2026, 15:35 UTC
Message-ID
<DB4PR03MB101065ECA4EC20732CDD56747C850A@DB4PR03MB10106.eurprd03.prod.outlook.com>
In-Reply-To
<ac0TNM2l1r_cgwYj@pks.im>
Ah gotcha. I just see that the client has not been auto-upgraded. 
I moved to 2.53 and now it works ok. 
Thank you and apologies for the false alarm. 
/m
-----Original Message-----
From: Patrick Steinhardt <ps@pks.im> 
Sent: Wednesday, April 1, 2026 2:45 PM
To: Miljan Mitrovic <mmitrovic@bentco.biz>
Cc: git@vger.kernel.org
Subject: Re: Cloning an empty SHA256 remote creates a local SHA1 repo
> This was a known bug indeed, but we eventually fixed this by announcing an "object-format" capability that tells the client about the repository's object format, even if it's empty.
The fixes required for this have been released as part of Git v2.41. So once you and your server run at least that version it should work as expected.
Thanks!
Patrick
Previous: Patrick Steinhardt
Message 3 of 3 in “Cloning an empty SHA256 remote creates a local SHA1 repo”
  1. Miljan MitrovicApr 1, 2026
  2. Patrick SteinhardtApr 1, 2026
  3. Miljan MitrovicApr 1, 2026

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.