Skip to content

Commit 8abd06c

Browse files
committed
fix: dev: use branch arg for clone with non-zero depth
Signed-off-by: Stephen L Arnold <nerdboy@gentoo.org>
1 parent 6d55f87 commit 8abd06c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/repolite/repolite.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,8 @@ def process_git_repos(flags, repos, pull, quiet):
298298
git_dir = item.repo_alias if item.repo_alias else item.repo_name
299299
logging.debug('Operating in git_dir: %s', git_dir)
300300
if not pull:
301+
if item.repo_depth > 0 and item.repo_branch:
302+
git_action = git_action + f'-b {item.repo_branch} '
301303
logging.debug('Checkout cmd: %s', git_checkout)
302304
if git_dir in list(dir_name_repo_intersect):
303305
logging.debug('Skipping existing repo: %s', git_dir)

0 commit comments

Comments
 (0)