threads / discuss / 64032

Shallow clone support in v3.0 and beyond?

Subject: Shallow clone support in v3.0 and beyond?

## tl;dr

3 messages between Aug 25, 2025 and Sep 10, 2025.

replies: 2people: 2as markdown or json

Bagas Sanjaya· Aug 25, 2025, 23:34 UTC · lore
Hi,

Askar Safin <safinaskar@zohomail.com> posted on the ML about his complaints regarding grafts removal in v3.0+ (see [1] for the full thread). He also briefly mentioned future of shallow clones (aka git clone --depth=1).

The question is: If grafts support is removed, then how can shallow clones be implemented in terms of git-replace(1)? What about its implementation details? How about unshallowing (git fetch --unshallow)?

Thanks.
[1]: https://lore.kernel.org/git/198c29e9058.119e3a5c065010.5888624019176274871@zohomail.com/T/#t
-- 
An old man doll... just what I always wanted! - Clara
Patrick Steinhardt· Sep 10, 2025, 11:08 UTC · re: Bagas Sanjaya · lore

Re: Shallow clone support in v3.0 and beyond?

Hi,
On Tue, Aug 26, 2025 at 06:34:02AM +0700, Bagas Sanjaya wrote:
Show 13 quoted lines
> Hi,
> 
> Askar Safin <safinaskar@zohomail.com> posted on the ML about his complaints
> regarding grafts removal in v3.0+ (see [1] for the full thread). He also
> briefly mentioned future of shallow clones (aka git clone --depth=1).
> 
> The question is: If grafts support is removed, then how can shallow clones
> be implemented in terms of git-replace(1)? What about its implementation
> details? How about unshallowing (git fetch --unshallow)?
> 
> Thanks.
> 
> [1]: https://lore.kernel.org/git/198c29e9058.119e3a5c065010.5888624019176274871@zohomail.com/T/#t

I think the BreakingChanges document could use a revamp in that regard. The mechanism used to implement shallow clones is of course _not_ going away, and the internal mechanism to facilitate this will go away.

So the intention really only to remove ".git/info/grafts" as a user-visible mechanism. Users should exclusively use git-replace(1).

Patrick
Bagas Sanjaya· Sep 10, 2025, 11:13 UTC · re: Patrick Steinhardt · lore

Re: Shallow clone support in v3.0 and beyond?

On 9/10/25 18:08, Patrick Steinhardt wrote:
Show 23 quoted lines
> Hi,
> 
> On Tue, Aug 26, 2025 at 06:34:02AM +0700, Bagas Sanjaya wrote:
>> Hi,
>>
>> Askar Safin <safinaskar@zohomail.com> posted on the ML about his complaints
>> regarding grafts removal in v3.0+ (see [1] for the full thread). He also
>> briefly mentioned future of shallow clones (aka git clone --depth=1).
>>
>> The question is: If grafts support is removed, then how can shallow clones
>> be implemented in terms of git-replace(1)? What about its implementation
>> details? How about unshallowing (git fetch --unshallow)?
>>
>> Thanks.
>>
>> [1]: https://lore.kernel.org/git/198c29e9058.119e3a5c065010.5888624019176274871@zohomail.com/T/#t
> 
> I think the BreakingChanges document could use a revamp in that regard.
> The mechanism used to implement shallow clones is of course _not_ going
> away, and the internal mechanism to facilitate this will go away.
> 
> So the intention really only to remove ".git/info/grafts" as a
> user-visible mechanism. Users should exclusively use git-replace(1).
OK, thanks!
-- 
An old man doll... just what I always wanted! - Clara

← back to recent threads