The manual page says: sync-depth Specifies sync depth to use for DVCS repositories. If set to 0, the depth is unlimited. Defaults to 0. However, according to the 83th line of lib/portage/sync/modules/git/git.py[1], the default value is 1 if sync-depth is not set. [1]: https://gitweb.gentoo.org/proj/portage.git/tree/lib/portage/sync/modules/git/git.py#n83
(In reply to Jian Lin from comment #0) > The manual page says: > sync-depth > Specifies sync depth to use for DVCS repositories. If set to 0, the > depth is unlimited. Defaults to 0. > > However, according to the 83th line of > lib/portage/sync/modules/git/git.py[1], the default value is 1 if sync-depth > is not set. > > [1]: > https://gitweb.gentoo.org/proj/portage.git/tree/lib/portage/sync/modules/git/ > git.py#n83 That particular git_cmd_opts setting is in the "new" method which is only called for the initial clone. It corresponds to the default clone-depth, which is correctly documented as 1 in the documentation. This code is confusing and for a moment I thought you were right about the default sync depth being 1.
Thanks. I didn't realize the existence of clone-depth. Now I know, and it makes sense.