From c9acd6ffa150c6630cc32bfb7e6713d6aa90e4e8 Mon Sep 17 00:00:00 2001 From: fsafasff <2624934035@qq.com> Date: Fri, 29 May 2026 11:21:40 +0800 Subject: [PATCH] fix: log source branch file count --- sync.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sync.py b/sync.py index 40ffbee48..feb1f309f 100644 --- a/sync.py +++ b/sync.py @@ -261,6 +261,9 @@ async def sync_oneway_inter_code(project: ProjectDTO, job: JobDTO): repo_dir = dir + "/" + project.name await cmd.shell('git status', repo_dir, job) + tracked_files, err = await cmd.shell('git ls-files', repo_dir, job) + tracked_files = [item for item in str.splitlines(tracked_files) if item] + await Log(LogType.INFO, f"The source branch {job.gitlab_branch} has {len(tracked_files)} tracked files", job.id) await cmd.shell( f"git remote add github {project.github_address}", repo_dir, job) await cmd.shell('git fetch github', repo_dir, job) -- 2.34.1