Skip to content

Add Depth to Commands.Fetch#2179

Open
MikaMika wants to merge 1 commit intolibgit2:masterfrom
MikaMika:patch-1
Open

Add Depth to Commands.Fetch#2179
MikaMika wants to merge 1 commit intolibgit2:masterfrom
MikaMika:patch-1

Conversation

@MikaMika
Copy link

@MikaMika MikaMika commented Mar 9, 2026

Thanks to #2070, it is now possible to Clone with shallow depth. In some cases you'd want to unshallow. The current workaround is to delete the local repo and re-Clone with full depth. To avoid this un-necessary step, the Depth could be respected by Fetch, the same way it is doing it for Clone.

This patch works for the cases I tested (don't forget to check repo.Info.IsShallow), but it seems too simple and I don't know what would be required to test and implement it properly. So I'd like to ask for help on this, thanks.

Thanks to libgit2#2070, it is now possible to Clone with shallow depth. In some cases you'd want to unshallow. The current workaround is to delete the local repo and re-Clone with full depth. To avoid this un-necessary step, the Depth could be respected by Fetch, the same way it is doing it for Clone.

This patch works for the cases I tested (don't forget to check `repo.Info.IsShallow`), but it seems too simple and I don't know what would be required to test and implement it properly. So I'd like to ask for help on this, thanks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant