Skip to contentSkip to conversation

Shallow clone support in v3.0 and beyond?

DISCUSSION Bagas Sanjaya 2 participants 3 messages Aug 25, 2025 – Sep 10, 2025

lore
Share & tools
lore
#0 lore raw

Hi,

Askar Safin <[email protected]> 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/[email protected]/T/#t

Signature · 1 line
An old man doll... just what I always wanted! - Clara
#1 lore raw

Hi,

Quoted 6 lines · Bagas Sanjaya

Hi,

Askar Safin <[email protected]> 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).

Quoted 7 lines

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/[email protected]/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

#2 lore raw
Quoted 15 lines · Patrick Steinhardt

Hi,

Quoted 12 lines · Bagas Sanjaya

Hi,

Askar Safin <[email protected]> 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.

Quoted 8 lines
Quoted 1 line

[1]: https://lore.kernel.org/git/[email protected]/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!

Signature · 1 line
An old man doll... just what I always wanted! - Clara