gitweb: Fix an issue when cloning existing repository

Skip all the other git clone progress log lines. Fixes
occasional `'total_progress' not defined` error.

Tested in the testing container that cloning exisiting repository
works.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Veiko Aasa authored and Sunil Mohan Adapa committed 2024-03-28 13:59:41 -07:00
1 parent ee7c6373fc
commit 0c47956c2a
1 file changed
+2
+2
View File
@@ -145,6 +145,8 @@ def _clone_status_line_to_percent(line):
total_progress = 10 + 0.6 * progress
elif 'Resolving deltas' in text:
total_progress = 70 + 0.3 * progress
else:
return None
return str(int(total_progress))