Skip to content

Commit 9be48eb

Browse files
committed
docs(gitlab[_warn_truncation]) Note unfiltered x-total may overstate truncation
why: _warn_truncation compares post-filter count against the x-total header (unfiltered server total); with skip_groups or other client-side filters active, the "Showing N of M" warning can mislead users. what: - Add TODO comment in _warn_truncation explaining the count mismatch
1 parent 0820f1f commit 9be48eb

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/vcspull/_internal/remotes/gitlab.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,12 @@ def _warn_truncation(
350350
if count < limit:
351351
return
352352

353+
# TODO: total_available comes from the x-total header which reflects
354+
# the unfiltered server-side project count. After client-side
355+
# filter_repo filtering (e.g. skip_groups, language, topics), count
356+
# may be less than total_available for reasons unrelated to --limit.
357+
# A more accurate message would require tracking pre-filter vs
358+
# post-filter counts separately.
353359
if total_available is not None and total_available > count:
354360
log.warning(
355361
"Showing %d of %d repositories (use --limit 0 to fetch all)",

0 commit comments

Comments
 (0)