gerrit-clone 2.2.2__tar.gz → 2.2.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/.pre-commit-config.yaml +45 -20
  2. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/IMPLEMENTATION.md +5 -5
  3. gerrit_clone-2.2.4/LICENSE +201 -0
  4. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/PKG-INFO +55 -6
  5. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/README.md +53 -5
  6. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/pyproject.toml +41 -1
  7. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/cli_clone_run.py +4 -0
  8. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/cli_clone_setup.py +6 -1
  9. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/cli_options_clone.py +3 -5
  10. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/cli_options_mirror.py +3 -5
  11. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/cli_refresh_run.py +52 -2
  12. gerrit_clone-2.2.4/src/gerrit_clone/clone_batching.py +100 -0
  13. gerrit_clone-2.2.4/src/gerrit_clone/clone_cleanup.py +302 -0
  14. gerrit_clone-2.2.4/src/gerrit_clone/clone_collection.py +125 -0
  15. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/clone_conflicts.py +146 -3
  16. gerrit_clone-2.2.4/src/gerrit_clone/clone_git_env.py +433 -0
  17. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/clone_manager.py +1 -0
  18. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/clone_nesting.py +64 -11
  19. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/clone_orchestrator.py +133 -173
  20. gerrit_clone-2.2.4/src/gerrit_clone/clone_reservations.py +435 -0
  21. gerrit_clone-2.2.4/src/gerrit_clone/clone_results.py +195 -0
  22. gerrit_clone-2.2.4/src/gerrit_clone/clone_timeout.py +202 -0
  23. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/clone_utils.py +4 -1
  24. gerrit_clone-2.2.4/src/gerrit_clone/concurrent_utils.py +269 -0
  25. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/config.py +7 -1
  26. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/content_filter.py +77 -64
  27. gerrit_clone-2.2.4/src/gerrit_clone/content_git.py +77 -0
  28. gerrit_clone-2.2.4/src/gerrit_clone/content_legacy.py +52 -0
  29. gerrit_clone-2.2.4/src/gerrit_clone/content_origin.py +179 -0
  30. gerrit_clone-2.2.4/src/gerrit_clone/content_policy.py +408 -0
  31. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/content_redaction.py +4 -8
  32. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/content_removal.py +33 -44
  33. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/content_scan.py +53 -95
  34. gerrit_clone-2.2.4/src/gerrit_clone/content_scan_process.py +165 -0
  35. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/content_worktree.py +65 -60
  36. gerrit_clone-2.2.4/src/gerrit_clone/git_credential_env.py +129 -0
  37. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/git_utils.py +22 -4
  38. gerrit_clone-2.2.4/src/gerrit_clone/github_clone_env.py +86 -0
  39. gerrit_clone-2.2.4/src/gerrit_clone/github_clone_url.py +266 -0
  40. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/github_gh_cli.py +42 -15
  41. gerrit_clone-2.2.4/src/gerrit_clone/github_token_hygiene.py +135 -0
  42. gerrit_clone-2.2.4/src/gerrit_clone/github_url_safety.py +357 -0
  43. gerrit_clone-2.2.4/src/gerrit_clone/github_worker.py +375 -0
  44. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/mirror_content_filters.py +33 -1
  45. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/mirror_manager.py +5 -1
  46. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/mirror_push.py +10 -16
  47. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/model_clone_results.py +2 -0
  48. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/model_refresh_results.py +4 -0
  49. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/models.py +9 -0
  50. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/pathing.py +28 -6
  51. gerrit_clone-2.2.4/src/gerrit_clone/process_groups.py +282 -0
  52. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/refresh_branch_repair.py +42 -84
  53. gerrit_clone-2.2.4/src/gerrit_clone/refresh_discovery.py +257 -0
  54. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/refresh_execution.py +41 -28
  55. gerrit_clone-2.2.4/src/gerrit_clone/refresh_filtered.py +338 -0
  56. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/refresh_force.py +9 -15
  57. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/refresh_git_env.py +104 -19
  58. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/refresh_manager.py +45 -1
  59. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/refresh_parallel.py +3 -0
  60. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/refresh_repo_state.py +120 -91
  61. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/refresh_worker.py +85 -19
  62. gerrit_clone-2.2.4/src/gerrit_clone/ssh_identity.py +58 -0
  63. gerrit_clone-2.2.4/src/gerrit_clone/subprocess_streaming.py +105 -0
  64. gerrit_clone-2.2.4/src/gerrit_clone/subprocess_tracking.py +438 -0
  65. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/worker.py +25 -61
  66. gerrit_clone-2.2.4/src/gerrit_clone/worker_preflight.py +186 -0
  67. gerrit_clone-2.2.4/tests/test_clone_git_env.py +726 -0
  68. gerrit_clone-2.2.4/tests/test_clone_nesting.py +115 -0
  69. gerrit_clone-2.2.4/tests/test_clone_orchestrator_timeout.py +2198 -0
  70. gerrit_clone-2.2.4/tests/test_clone_results.py +168 -0
  71. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/test_clone_utils.py +17 -0
  72. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/test_content_filter.py +57 -23
  73. gerrit_clone-2.2.4/tests/test_content_legacy.py +265 -0
  74. gerrit_clone-2.2.4/tests/test_content_origin.py +240 -0
  75. gerrit_clone-2.2.4/tests/test_content_policy.py +381 -0
  76. gerrit_clone-2.2.4/tests/test_content_tracking.py +513 -0
  77. gerrit_clone-2.2.4/tests/test_content_worktree_failures.py +206 -0
  78. gerrit_clone-2.2.4/tests/test_git_credential_env.py +1027 -0
  79. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/test_git_utils.py +63 -0
  80. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/test_mirror_manager.py +43 -2
  81. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/test_pathing.py +65 -0
  82. gerrit_clone-2.2.4/tests/test_refresh_bare_mirrors.py +879 -0
  83. gerrit_clone-2.2.4/tests/test_refresh_remotes.py +100 -0
  84. gerrit_clone-2.2.4/tests/test_refresh_tracking.py +262 -0
  85. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/test_refresh_worker.py +255 -227
  86. gerrit_clone-2.2.4/tests/test_ssh_identity.py +123 -0
  87. gerrit_clone-2.2.4/tests/test_subprocess_tracking.py +1283 -0
  88. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/unit/test_github_worker.py +300 -76
  89. gerrit_clone-2.2.2/LICENSE +0 -1
  90. gerrit_clone-2.2.2/src/gerrit_clone/clone_git_env.py +0 -195
  91. gerrit_clone-2.2.2/src/gerrit_clone/clone_results.py +0 -124
  92. gerrit_clone-2.2.2/src/gerrit_clone/concurrent_utils.py +0 -161
  93. gerrit_clone-2.2.2/src/gerrit_clone/github_clone_env.py +0 -67
  94. gerrit_clone-2.2.2/src/gerrit_clone/github_clone_url.py +0 -102
  95. gerrit_clone-2.2.2/src/gerrit_clone/github_token_hygiene.py +0 -98
  96. gerrit_clone-2.2.2/src/gerrit_clone/github_worker.py +0 -225
  97. gerrit_clone-2.2.2/src/gerrit_clone/refresh_discovery.py +0 -188
  98. gerrit_clone-2.2.2/tests/test_clone_orchestrator_timeout.py +0 -165
  99. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/.gitignore +0 -0
  100. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/action.yaml +0 -0
  101. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/__init__.py +0 -0
  102. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/cli.py +0 -0
  103. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/cli_app.py +0 -0
  104. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/cli_clone.py +0 -0
  105. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/cli_clone_models.py +0 -0
  106. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/cli_config.py +0 -0
  107. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/cli_hooks.py +0 -0
  108. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/cli_mirror.py +0 -0
  109. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/cli_mirror_models.py +0 -0
  110. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/cli_mirror_run.py +0 -0
  111. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/cli_mirror_setup.py +0 -0
  112. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/cli_options_refresh.py +0 -0
  113. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/cli_options_reset.py +0 -0
  114. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/cli_refresh.py +0 -0
  115. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/cli_refresh_report.py +0 -0
  116. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/cli_reset.py +0 -0
  117. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/cli_reset_run.py +0 -0
  118. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/cli_session.py +0 -0
  119. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/clone_diagnostics.py +0 -0
  120. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/clone_locking.py +0 -0
  121. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/clone_ordering.py +0 -0
  122. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/clone_refresh.py +0 -0
  123. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/clone_reporting.py +0 -0
  124. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/clone_retry_policy.py +0 -0
  125. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/clone_stages.py +0 -0
  126. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/config_env.py +0 -0
  127. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/config_errors.py +0 -0
  128. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/content_patterns.py +0 -0
  129. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/discovery.py +0 -0
  130. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/error_codes.py +0 -0
  131. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/error_collection.py +0 -0
  132. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/file_logging.py +0 -0
  133. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/gerrit_api.py +0 -0
  134. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/git_comparison.py +0 -0
  135. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/github_api.py +0 -0
  136. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/github_async_pacing.py +0 -0
  137. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/github_async_repo.py +0 -0
  138. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/github_batch_support.py +0 -0
  139. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/github_clone_results.py +0 -0
  140. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/github_discovery.py +0 -0
  141. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/github_graphql.py +0 -0
  142. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/github_models.py +0 -0
  143. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/github_repo_ops.py +0 -0
  144. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/github_transport.py +0 -0
  145. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/logging.py +0 -0
  146. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/mirror_branch_repair.py +0 -0
  147. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/mirror_cleanup.py +0 -0
  148. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/mirror_default_branch.py +0 -0
  149. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/mirror_filtering.py +0 -0
  150. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/mirror_git_refs.py +0 -0
  151. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/mirror_models.py +0 -0
  152. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/mirror_planning.py +0 -0
  153. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/mirror_result_builder.py +0 -0
  154. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/model_config_validation.py +0 -0
  155. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/model_enums.py +0 -0
  156. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/model_project.py +0 -0
  157. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/model_project_filters.py +0 -0
  158. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/netrc.py +0 -0
  159. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/netrc_discovery.py +0 -0
  160. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/netrc_models.py +0 -0
  161. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/netrc_parser.py +0 -0
  162. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/output_utils.py +0 -0
  163. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/path_errors.py +0 -0
  164. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/path_naming.py +0 -0
  165. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/progress.py +0 -0
  166. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/progress_display.py +0 -0
  167. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/progress_live.py +0 -0
  168. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/progress_modes.py +0 -0
  169. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/progress_results.py +0 -0
  170. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/progress_summary.py +0 -0
  171. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/py.typed +0 -0
  172. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/rate_limit.py +0 -0
  173. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/rate_limit_budget.py +0 -0
  174. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/rate_limit_helpers.py +0 -0
  175. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/rate_limit_progress.py +0 -0
  176. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/refresh_output.py +0 -0
  177. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/reset_confirmation.py +0 -0
  178. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/reset_deletion.py +0 -0
  179. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/reset_display.py +0 -0
  180. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/reset_manager.py +0 -0
  181. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/reset_models.py +0 -0
  182. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/retry.py +0 -0
  183. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/rich_optional.py +0 -0
  184. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/rich_status.py +0 -0
  185. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/ssh_discovery.py +0 -0
  186. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/src/gerrit_clone/unified_discovery.py +0 -0
  187. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/__init__.py +0 -0
  188. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/conftest.py +0 -0
  189. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/integration/__init__.py +0 -0
  190. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/integration/test_discovery_integration.py +0 -0
  191. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/integration/test_github_clone.py +0 -0
  192. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/test_action_cli_alignment.py +0 -0
  193. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/test_cli_netrc_options.py +0 -0
  194. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/test_clone_manager_github_refresh.py +0 -0
  195. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/test_config.py +0 -0
  196. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/test_content_redaction.py +0 -0
  197. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/test_file_logging_changes.py +0 -0
  198. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/test_gerrit_api.py +0 -0
  199. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/test_git_comparison.py +0 -0
  200. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/test_github_api.py +0 -0
  201. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/test_logging.py +0 -0
  202. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/test_models.py +0 -0
  203. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/test_netrc.py +0 -0
  204. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/test_output_utils.py +0 -0
  205. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/test_project_filtering.py +0 -0
  206. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/test_rate_limit.py +0 -0
  207. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/test_refresh_manager.py +0 -0
  208. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/test_reset_manager.py +0 -0
  209. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/test_reset_models.py +0 -0
  210. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/test_retry.py +0 -0
  211. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/test_rich_optional.py +0 -0
  212. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/test_worker.py +0 -0
  213. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/unit/__init__.py +0 -0
  214. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/unit/test_discovery.py +0 -0
  215. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/unit/test_github_discovery.py +0 -0
  216. {gerrit_clone-2.2.2 → gerrit_clone-2.2.4}/tests/unit/test_unified_discovery.py +0 -0
@@ -4,21 +4,37 @@
4
4
 
5
5
  ci:
6
6
  autofix_prs: false
7
- skip: [basedpyright, pytest, gha-workflow-linter]
7
+ skip:
8
+ - gha-workflow-linter
9
+ - aislop
10
+ - basedpyright
11
+ - pytest
8
12
  autofix_commit_msg: |
9
- Chore: pre-commit autofixes
13
+ Chore: Pre-commit autofixes
10
14
 
11
15
  Signed-off-by: pre-commit-ci[bot] <pre-commit-ci@users.noreply.github.com>
12
16
  autoupdate_commit_msg: |
13
- Chore: pre-commit autoupdate
17
+ Chore: Pre-commit autoupdate
14
18
 
15
19
  Signed-off-by: pre-commit-ci[bot] <pre-commit-ci@users.noreply.github.com>
16
20
 
21
+ default_install_hook_types: [pre-commit, commit-msg]
22
+ default_stages: [pre-commit]
23
+
17
24
  exclude: "^docs/conf.py"
18
25
 
19
26
  repos:
27
+ - repo: local
28
+ hooks:
29
+ - id: frozen-rev-is-a-release
30
+ name: frozen revs name a release
31
+ language: pygrep
32
+ # yamllint disable-line rule:line-length
33
+ entry: '^\s*rev:\s*\S+\s+#\s*frozen:(?!\s+v?[0-9]+(\.[0-9]+)*(-[0-9]+)?\s*$)'
34
+ files: '^\.pre-commit-config\.yaml$'
35
+
20
36
  - repo: https://github.com/pre-commit/pre-commit-hooks
21
- rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
37
+ rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
22
38
  hooks:
23
39
  - id: trailing-whitespace
24
40
  - id: check-added-large-files
@@ -40,8 +56,14 @@ repos:
40
56
  - --branch=rc
41
57
  - --branch=production
42
58
 
59
+ - repo: https://github.com/gitleaks/gitleaks
60
+ rev: 2ca41cc1372d1e939a6a879f18cdc19fc1cac1ce # frozen: v8.30.0
61
+ hooks:
62
+ - id: gitleaks
63
+ always_run: true
64
+
43
65
  - repo: https://github.com/jorisroovers/gitlint
44
- rev: acc9d9de6369b76d22cb4167029d2035e8730b98 # frozen: v0.19.1
66
+ rev: acc9d9de6369b76d22cb4167029d2035e8730b98 # frozen: v0.19.1
45
67
  hooks:
46
68
  - id: gitlint
47
69
 
@@ -52,13 +74,11 @@ repos:
52
74
  types: [yaml]
53
75
 
54
76
  - repo: https://github.com/astral-sh/ruff-pre-commit
55
- rev: aab412d509121cb5f7533134b7e67f9fab59c682 # frozen: v0.16.4
77
+ rev: a56c0b927e6465d37cae3e97d35d4d18ab2b96cd # frozen: v0.16.9
56
78
  hooks:
57
79
  - id: ruff
58
- files: ^(scripts|tests|custom_components)/.+\.py$
59
80
  args: [--fix, --exit-non-zero-on-fix]
60
81
  - id: ruff-format
61
- files: ^(scripts|tests|custom_components)/.+\.py$
62
82
 
63
83
  - repo: https://github.com/pre-commit/mirrors-mypy
64
84
  rev: 7ff8d35ae36a7d2b968f2f90b4c723e292e594ee # frozen: v2.3.1
@@ -73,7 +93,7 @@ repos:
73
93
  - typer>=0.15.1
74
94
 
75
95
  - repo: https://github.com/btford/write-good
76
- rev: ab66ce10136dfad5146e69e70f82a3efac8842c1 # frozen: v1.0.8
96
+ rev: ab66ce10136dfad5146e69e70f82a3efac8842c1 # frozen: v1.0.8
77
97
  hooks:
78
98
  - id: write-good
79
99
  files: "\\.(rst|md|markdown|mdown|mkdn)$"
@@ -95,32 +115,38 @@ repos:
95
115
  hooks:
96
116
  - id: reuse
97
117
 
98
- # Replaces: https://github.com/rhysd/actionlint
99
- # Permits actionlint to run both locally and with precommit.ci/GitHub
100
- - repo: https://github.com/Mateusz-Grzelinski/actionlint-py
101
- rev: c04ed26e40637cab1aa9879c693832a9c120fb20 # frozen: v1.7.12.24
118
+ - repo: https://github.com/kjanat/actionlint
119
+ rev: 2da2ceb4af2c7ecc48f5b9311d85080c3971b5f0 # frozen: v1.17.0
102
120
  hooks:
103
- - id: actionlint
121
+ - id: actionlint-shellcheck
104
122
 
105
- # Check for misspellings in documentation files
106
123
  - repo: https://github.com/codespell-project/codespell
107
124
  rev: 57b21406f092110c18776e39b0bda50d37c945c8 # frozen: v2.4.3
108
125
  hooks:
109
126
  - id: codespell
110
127
 
111
- # Requires a mirror, primary repo lacks .pre-commit-hooks.yaml
112
128
  - repo: https://github.com/DetachHead/basedpyright-prek-mirror
113
- rev: 3c94d276aa3005fa1f5a977946c9dc106135c083 # frozen: 1.39.10
129
+ rev: 706e6acebe9e88c2c28d1527d3085a14b11794c4 # frozen: 1.40.1
114
130
  hooks:
115
131
  - id: basedpyright
116
132
 
117
133
  - repo: https://github.com/lfreleng-actions/gha-workflow-linter
118
- rev: 42aa4db931ab4c9da0930ae5ca2259ab08da79cb # frozen: v1.5.2
134
+ rev: 0c582e431022f1c7004196fb4ea32744d1fe4843 # frozen: v1.7.0
119
135
  hooks:
120
136
  - id: gha-workflow-linter
121
137
 
138
+ - repo: local
139
+ hooks:
140
+ - id: aislop
141
+ name: aislop
142
+ entry: aislop ci --human
143
+ language: node
144
+ additional_dependencies: ["aislop@0.13.1"]
145
+ pass_filenames: false
146
+ always_run: true
147
+
122
148
  - repo: https://github.com/python-jsonschema/check-jsonschema
123
- rev: c4654a7e007c9619a5eb63c39a456572a0fa1851 # frozen: 0.38.0
149
+ rev: 4f85d46a92dc17713078e5de73f8a13190edf6fc # frozen: 0.38.2
124
150
  hooks:
125
151
  - id: check-github-actions
126
152
  - id: check-github-workflows
@@ -134,7 +160,6 @@ repos:
134
160
  - yaml
135
161
  - id: check-readthedocs
136
162
 
137
- # Run tests last to ensure all code changes from other hooks are tested
138
163
  - repo: local
139
164
  hooks:
140
165
  - id: pytest
@@ -253,11 +253,11 @@ Host gerrit.example.org
253
253
 
254
254
  ```python
255
255
  RetryPolicy(
256
- max_attempts=3, # Default retry count
257
- base_delay=2.0, # Initial delay in seconds
258
- factor=2.0, # Exponential backoff factor
259
- max_delay=30.0, # Upper delay cap
260
- jitter=True # Randomization enabled
256
+ max_attempts=3, # Default retry count
257
+ base_delay=2.0, # Initial delay in seconds
258
+ factor=2.0, # Exponential backoff factor
259
+ max_delay=30.0, # Upper delay cap
260
+ jitter=True, # Randomization enabled
261
261
  )
262
262
  ```
263
263
 
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: gerrit-clone
3
- Version: 2.2.2
3
+ Version: 2.2.4
4
4
  Summary: A multi-threaded CLI tool for bulk cloning repositories from Gerrit servers
5
5
  Project-URL: Homepage, https://github.com/lfreleng-actions/gerrit-clone-action
6
6
  Project-URL: Documentation, https://github.com/lfreleng-actions/gerrit-clone-action#readme
@@ -32,6 +32,7 @@ Requires-Dist: pyyaml<7.0.0,>=6.0.3
32
32
  Requires-Dist: rich<16.0.0,>=14.2.0
33
33
  Requires-Dist: typer<0.28.0,>=0.21.1
34
34
  Provides-Extra: dev
35
+ Requires-Dist: git-filter-repo<3.0.0,>=2.47.0; extra == 'dev'
35
36
  Requires-Dist: pytest-asyncio<1.5.0,>=0.25.3; extra == 'dev'
36
37
  Requires-Dist: pytest-cov<8.0.0,>=6.3.0; extra == 'dev'
37
38
  Requires-Dist: pytest-mock<4.0.0,>=3.15.1; extra == 'dev'
@@ -225,6 +226,36 @@ a warning.
225
226
 
226
227
  ### Refresh Command Examples
227
228
 
229
+ `refresh` finds both kinds of clone beneath the output path. A default
230
+ (mirror) clone is a bare repository, so it has no branch to pull: refresh
231
+ fetches every ref into it and prunes refs deleted upstream (unless
232
+ `--no-prune`). The branch options (`--strategy`, `--auto-stash`, `--force`,
233
+ `--force-hard`) apply to working-tree (`--no-mirror`) clones only. Refresh
234
+ skips a bare repository with no fetch refspec that updates a ref, such as
235
+ one made by `git clone --bare`, and says why: fetching it would update
236
+ nothing. If the
237
+ command finds no repositories at all, it says so and exits with status 1
238
+ rather than reporting success.
239
+
240
+ A repository that content filtering (`--remove-files`, `--git-filter`,
241
+ `--redact-secrets`) has rewritten gets refreshed only by a run whose filters
242
+ include the ones that rewrote it, since fetching forces the original history
243
+ back, filtered content included. Each repository records which filters
244
+ rewrote it, keeping each `--git-filter` token as a SHA-256 digest only.
245
+ Refresh copies such a mirror, fetches and filters the copy, and publishes
246
+ its refs only when every step succeeds, so a failure leaves the mirror
247
+ unchanged. A run without those filters skips the mirror and says which
248
+ filters it lacks; the same applies to re-running `clone` and `mirror`. A
249
+ filtered working copy (`--no-mirror`) is always skipped: re-clone it to
250
+ update it. Every remote of a filtered repository refuses pushes.
251
+ Releases up to v2.2.4 recorded no filters, so refresh skips any
252
+ repository they filtered, whatever filters you pass, and asks you to
253
+ re-clone it. It recognises one by the traces those releases left: the
254
+ commit map a `git filter-repo` rewrite leaves in the git directory, or a
255
+ branch tip committed by the file-removal fallback (`Remove filtered files
256
+ for platform sync`).
257
+ A `--dry-run` applies no content filters.
258
+
228
259
  Refresh all repositories in the current directory:
229
260
 
230
261
  ```bash
@@ -1266,10 +1297,14 @@ The following SSH authentication options are available across all interfaces:
1266
1297
  | SSH Key | `-i` (file path) | `GERRIT_SSH_PRIVATE_KEY` | `ssh-private-key` (content) | Identity file |
1267
1298
  | Host Check | `--strict-host` | `GERRIT_STRICT_HOST` | `strict-host` | Key check |
1268
1299
 
1269
- > **Note:** The CLI flag `--ssh-identity-file` / `-i` expects a **file path**
1270
- > to a private key on disk. The GitHub Action input `ssh-private-key` expects
1271
- > the raw key **content** (loaded into an SSH agent). The legacy CLI alias
1272
- > `--ssh-private-key` is still accepted for backward compatibility.
1300
+ > **Note:** The CLI flag `--ssh-identity-file` / `-i` and the
1301
+ > `GERRIT_SSH_PRIVATE_KEY` environment variable expect a **file path** to a
1302
+ > private key on disk. The GitHub Action input `ssh-private-key` expects the
1303
+ > raw key **content** (loaded into an SSH agent). Never place key content in
1304
+ > `GERRIT_SSH_PRIVATE_KEY`: the CLI rejects it, without echoing the value. In
1305
+ > workflows, hold the secret in a differently named variable and pipe it to
1306
+ > `ssh-add -`. The legacy CLI alias `--ssh-private-key` is still accepted for
1307
+ > backward compatibility.
1273
1308
 
1274
1309
  <!-- markdownlint-enable MD013 -->
1275
1310
 
@@ -1494,9 +1529,23 @@ cloned, while maintaining visibility into discovery issues between the two metho
1494
1529
 
1495
1530
  - Python 3.11+ (tested on 3.11, 3.12, 3.13, 3.14)
1496
1531
  - uv package manager (for development)
1497
- - Git (for clone operations)
1532
+ - Git 2.31+ (for clone operations)
1533
+ - libcurl 7.58+ (for HTTPS token authentication)
1498
1534
  - SSH client (for authentication)
1499
1535
 
1536
+ > **Note:** Git 2.31 (March 2021) introduced the `GIT_CONFIG_COUNT` /
1537
+ > `GIT_CONFIG_KEY_*` / `GIT_CONFIG_VALUE_*` environment variables. Both the
1538
+ > clone and mirror-push paths use them to pass a GitHub token to `git`, so the
1539
+ > token stays out of the command line and out of the host's process listing.
1540
+ > Older Git releases ignore those variables, and HTTPS token authentication
1541
+ > will fail.
1542
+ >
1543
+ > The token travels as an `Authorization` header scoped to the source host.
1544
+ > Git hands that to libcurl as a custom header, and libcurl before 7.58
1545
+ > (January 2018, CVE-2018-1000007) forwards a custom `Authorization` to a
1546
+ > different host across a redirect. Every current distribution ships a later
1547
+ > release; the floor matters only for a long-lived self-hosted runner.
1548
+
1500
1549
  ### Setup
1501
1550
 
1502
1551
  ```bash
@@ -184,6 +184,36 @@ a warning.
184
184
 
185
185
  ### Refresh Command Examples
186
186
 
187
+ `refresh` finds both kinds of clone beneath the output path. A default
188
+ (mirror) clone is a bare repository, so it has no branch to pull: refresh
189
+ fetches every ref into it and prunes refs deleted upstream (unless
190
+ `--no-prune`). The branch options (`--strategy`, `--auto-stash`, `--force`,
191
+ `--force-hard`) apply to working-tree (`--no-mirror`) clones only. Refresh
192
+ skips a bare repository with no fetch refspec that updates a ref, such as
193
+ one made by `git clone --bare`, and says why: fetching it would update
194
+ nothing. If the
195
+ command finds no repositories at all, it says so and exits with status 1
196
+ rather than reporting success.
197
+
198
+ A repository that content filtering (`--remove-files`, `--git-filter`,
199
+ `--redact-secrets`) has rewritten gets refreshed only by a run whose filters
200
+ include the ones that rewrote it, since fetching forces the original history
201
+ back, filtered content included. Each repository records which filters
202
+ rewrote it, keeping each `--git-filter` token as a SHA-256 digest only.
203
+ Refresh copies such a mirror, fetches and filters the copy, and publishes
204
+ its refs only when every step succeeds, so a failure leaves the mirror
205
+ unchanged. A run without those filters skips the mirror and says which
206
+ filters it lacks; the same applies to re-running `clone` and `mirror`. A
207
+ filtered working copy (`--no-mirror`) is always skipped: re-clone it to
208
+ update it. Every remote of a filtered repository refuses pushes.
209
+ Releases up to v2.2.4 recorded no filters, so refresh skips any
210
+ repository they filtered, whatever filters you pass, and asks you to
211
+ re-clone it. It recognises one by the traces those releases left: the
212
+ commit map a `git filter-repo` rewrite leaves in the git directory, or a
213
+ branch tip committed by the file-removal fallback (`Remove filtered files
214
+ for platform sync`).
215
+ A `--dry-run` applies no content filters.
216
+
187
217
  Refresh all repositories in the current directory:
188
218
 
189
219
  ```bash
@@ -1225,10 +1255,14 @@ The following SSH authentication options are available across all interfaces:
1225
1255
  | SSH Key | `-i` (file path) | `GERRIT_SSH_PRIVATE_KEY` | `ssh-private-key` (content) | Identity file |
1226
1256
  | Host Check | `--strict-host` | `GERRIT_STRICT_HOST` | `strict-host` | Key check |
1227
1257
 
1228
- > **Note:** The CLI flag `--ssh-identity-file` / `-i` expects a **file path**
1229
- > to a private key on disk. The GitHub Action input `ssh-private-key` expects
1230
- > the raw key **content** (loaded into an SSH agent). The legacy CLI alias
1231
- > `--ssh-private-key` is still accepted for backward compatibility.
1258
+ > **Note:** The CLI flag `--ssh-identity-file` / `-i` and the
1259
+ > `GERRIT_SSH_PRIVATE_KEY` environment variable expect a **file path** to a
1260
+ > private key on disk. The GitHub Action input `ssh-private-key` expects the
1261
+ > raw key **content** (loaded into an SSH agent). Never place key content in
1262
+ > `GERRIT_SSH_PRIVATE_KEY`: the CLI rejects it, without echoing the value. In
1263
+ > workflows, hold the secret in a differently named variable and pipe it to
1264
+ > `ssh-add -`. The legacy CLI alias `--ssh-private-key` is still accepted for
1265
+ > backward compatibility.
1232
1266
 
1233
1267
  <!-- markdownlint-enable MD013 -->
1234
1268
 
@@ -1453,9 +1487,23 @@ cloned, while maintaining visibility into discovery issues between the two metho
1453
1487
 
1454
1488
  - Python 3.11+ (tested on 3.11, 3.12, 3.13, 3.14)
1455
1489
  - uv package manager (for development)
1456
- - Git (for clone operations)
1490
+ - Git 2.31+ (for clone operations)
1491
+ - libcurl 7.58+ (for HTTPS token authentication)
1457
1492
  - SSH client (for authentication)
1458
1493
 
1494
+ > **Note:** Git 2.31 (March 2021) introduced the `GIT_CONFIG_COUNT` /
1495
+ > `GIT_CONFIG_KEY_*` / `GIT_CONFIG_VALUE_*` environment variables. Both the
1496
+ > clone and mirror-push paths use them to pass a GitHub token to `git`, so the
1497
+ > token stays out of the command line and out of the host's process listing.
1498
+ > Older Git releases ignore those variables, and HTTPS token authentication
1499
+ > will fail.
1500
+ >
1501
+ > The token travels as an `Authorization` header scoped to the source host.
1502
+ > Git hands that to libcurl as a custom header, and libcurl before 7.58
1503
+ > (January 2018, CVE-2018-1000007) forwards a custom `Authorization` to a
1504
+ > different host across a redirect. Every current distribution ships a later
1505
+ > release; the floor matters only for a long-lived self-hosted runner.
1506
+
1459
1507
  ### Setup
1460
1508
 
1461
1509
  ```bash
@@ -2,7 +2,12 @@
2
2
  # SPDX-FileCopyrightText: 2025 The Linux Foundation
3
3
 
4
4
  [build-system]
5
- requires = ["hatchling", "hatch-vcs"]
5
+ # PEP 517 builds run in an isolated environment that uv.lock does not
6
+ # govern, so these are resolved fresh from PyPI on every build --
7
+ # including the release build. Bounding them stops that resolution
8
+ # crossing a major release of the build backend unnoticed. The floors
9
+ # match the dev dependency-group entries Dependabot maintains.
10
+ requires = ["hatchling>=1.27.0,<2.0.0", "hatch-vcs>=0.5.0,<1.0.0"]
6
11
  build-backend = "hatchling.build"
7
12
 
8
13
  [project]
@@ -53,6 +58,12 @@ dependencies = [
53
58
 
54
59
  [project.optional-dependencies]
55
60
  dev = [
61
+ # Supplies the ``git-filter-repo`` executable that content filtering
62
+ # shells out to. Listed here as well as in the dev dependency group
63
+ # because CI's test job installs this extra (``.[test,dev]``) and
64
+ # never reads the group: without it the history-rewriting tests
65
+ # cannot run there.
66
+ "git-filter-repo>=2.47.0,<3.0.0",
56
67
  "pytest>=8.4.2,<10.0.0",
57
68
  "pytest-cov>=6.3.0,<8.0.0",
58
69
  "pytest-mock>=3.15.1,<4.0.0",
@@ -283,6 +294,15 @@ asyncio_default_fixture_loop_scope = "function"
283
294
 
284
295
  # Coverage configuration
285
296
  [tool.coverage.run]
297
+ # Keep the transient coverage database out of the working tree.
298
+ # coverage.py resolves a relative data_file against the current
299
+ # directory, so the default '.coverage' lands wherever pytest runs and
300
+ # can be picked up by tests that inspect on-disk content. TEMP is
301
+ # set on Windows, where /tmp does not exist; elsewhere it is normally
302
+ # unset and the /tmp fallback applies. An explicit value also
303
+ # satisfies python-test-action's data_file configuration check.
304
+ # COVERAGE_FILE (env) still takes precedence when set.
305
+ data_file = "${TEMP-/tmp}/.coverage.gerrit-clone-action"
286
306
  source = ["gerrit_clone"]
287
307
  branch = true
288
308
  omit = [
@@ -355,8 +375,28 @@ reportIncompatibleVariableOverride = "error"
355
375
  reportOverlappingOverload = "error"
356
376
  reportUnsupportedDunderAll = "error"
357
377
 
378
+ [tool.uv]
379
+ # `[build-system] requires` bounds this project's own build environment
380
+ # only. These constraints apply to every isolated build environment uv
381
+ # creates, so a dependency that has to be built from an sdist is held to
382
+ # the same bounds.
383
+ #
384
+ # Deliberately ranges rather than `==` pins: an exact pin would have to
385
+ # be bumped by hand before a new Python release could build at all,
386
+ # whereas a major-version cap still blocks the breaking change without
387
+ # blocking routine patches.
388
+ build-constraint-dependencies = [
389
+ "hatchling>=1.27.0,<2.0.0",
390
+ "hatch-vcs>=0.5.0,<1.0.0",
391
+ ]
392
+
358
393
  [dependency-groups]
359
394
  dev = [
395
+ # Supplies the ``git-filter-repo`` executable that
396
+ # gerrit_clone.content_filter shells out to; declared here so both
397
+ # the test suite and CI resolve it from uv.lock (hash-pinned)
398
+ # rather than an unpinned PyPI fetch.
399
+ "git-filter-repo>=2.47.0",
360
400
  "hatch-vcs>=0.5.0",
361
401
  "hatchling>=1.27.0",
362
402
  "mypy>=1.18.2",
@@ -125,6 +125,10 @@ def _apply_content_filters(
125
125
  for cr in batch_result.results:
126
126
  if not cr.success or not cr.path:
127
127
  continue
128
+ if cr.content_filtered:
129
+ # Re-filtered as part of its staged refresh already.
130
+ filter_success += 1
131
+ continue
128
132
  succeeded, failed = _filter_repository(
129
133
  request, console, cr, remove_file_patterns, git_filter_projects
130
134
  )
@@ -21,6 +21,7 @@ from rich.text import Text
21
21
  from gerrit_clone import cli_hooks
22
22
  from gerrit_clone.cli_app import format_version_string
23
23
  from gerrit_clone.config import ConfigurationError, load_config
24
+ from gerrit_clone.content_policy import ContentFilterSpec
24
25
  from gerrit_clone.error_codes import ExitCode
25
26
  from gerrit_clone.file_logging import (
26
27
  cli_args_to_dict,
@@ -273,7 +274,7 @@ def build_config(
273
274
  ) -> Config:
274
275
  """Load the effective configuration, reporting configuration errors."""
275
276
  try:
276
- return load_config(
277
+ config = load_config(
277
278
  host=request.host,
278
279
  port=request.port, # Leave as None for GitHub, will default to 29418 for Gerrit
279
280
  base_url=request.base_url,
@@ -317,6 +318,10 @@ def build_config(
317
318
  except ConfigurationError as e:
318
319
  _report_configuration_error(session, e)
319
320
  raise typer.Exit(ExitCode.CONFIGURATION_ERROR) from e
321
+ config.content_filters = ContentFilterSpec.from_options(
322
+ request.remove_files, request.git_filter, request.redact_secrets, config.path
323
+ )
324
+ return config
320
325
 
321
326
 
322
327
  def _report_configuration_error(session: CliSession, error: ConfigurationError) -> None:
@@ -14,6 +14,8 @@ from pathlib import Path
14
14
 
15
15
  import typer
16
16
 
17
+ from gerrit_clone.ssh_identity import parse_identity_file
18
+
17
19
  HOST = typer.Option(
18
20
  ...,
19
21
  "--host",
@@ -78,11 +80,7 @@ SSH_IDENTITY_FILE = typer.Option(
78
80
  "-i",
79
81
  help="SSH identity (private key) file path for authentication",
80
82
  envvar="GERRIT_SSH_PRIVATE_KEY",
81
- exists=True,
82
- file_okay=True,
83
- dir_okay=False,
84
- readable=True,
85
- resolve_path=True,
83
+ parser=parse_identity_file,
86
84
  )
87
85
  OUTPUT_PATH = typer.Option(
88
86
  Path(),