feat(history-rewrite): Enhance history rewrite process with detailed backup and validation steps
- Added a comprehensive plan for history rewrites in `docs/plans/history_rewrite.md`, including backup requirements and a checklist for destructive operations. - Created a QA report for history-rewrite scripts in `docs/reports/qa_report.md`, summarizing tests, findings, and recommendations. - Introduced `check_refs.sh` script to list branches and tags, saving a tarball of tag references. - Updated `clean_history.sh` to include non-interactive mode and improved error handling for backup branch pushes. - Enhanced `preview_removals.sh` to support JSON output format and added shallow clone detection. - Added Bats tests for `clean_history.sh` and `validate_after_rewrite.sh` to ensure functionality and error handling. - Implemented pre-commit hook to block commits to `data/backups/` directory. - Improved validation script to check for backup branch existence and run pre-commit checks. - Created temporary test scripts for validating `clean_history.sh` and `validate_after_rewrite.sh` functionality.
This commit is contained in:
@@ -50,6 +50,13 @@ repos:
|
||||
pass_filenames: false
|
||||
verbose: true
|
||||
always_run: true
|
||||
- id: block-data-backups-commit
|
||||
name: Prevent committing data/backups files
|
||||
entry: bash scripts/pre-commit-hooks/block-data-backups-commit.sh
|
||||
language: system
|
||||
pass_filenames: false
|
||||
verbose: true
|
||||
always_run: true
|
||||
|
||||
# === MANUAL/CI-ONLY HOOKS ===
|
||||
# These are slow and should only run on-demand or in CI
|
||||
|
||||
Reference in New Issue
Block a user