fetch.c
5.98 KB
-
fetch: enable deepening/shortening shallow clones · 4ed1bd15
A shallow repository can currently only be completely unshallowed, which is caused by mark_local() only marking locally-existing objects as wanted if the fetch depth is set to INT_MAX (GIT_FETCH_DEPTH_UNSHALLOW). This prevents deepening the history of a shallow clone to an arbitrary number of commits, which may be preferable over full unshallowing for large repositories. Enable deepening and shortening shallow clones by marking locally-existing objects as wanted whenever the fetch depth is set to any non-default value (either GIT_FETCH_DEPTH_UNSHALLOW or an arbitrary positive integer).
Michał Kępień committed