harbor run -t LiteCoder/reorder-git-commit-historyharbor download LiteCoder/reorder-git-commit-historyReorder a Git repository's commit history to place all bug-fix commits before feature-adding commits while preserving the final project state.
Technical Requirements:
Task Description:
You have a Git repository at /app/repo with a linear commit history (no merges) containing interleaved bug fixes and feature additions. Reorder the commits so that all bug-fix commits come before feature-adding commits, while ensuring the final project state remains identical.
Requirements:
/app/repo to identify bug fixes vs. feature additions based on commit messages and diffsbackup-original pointing to the current HEADreordered-history with the reordered commits/app/reorder_report.jsonOutput Format:
The /app/reorder_report.json file must contain:
{
"original_order": [
{"hash": "abc1234", "message": "commit message", "type": "feature"},
{"hash": "def5678", "message": "commit message", "type": "bugfix"}
],
"new_order": [
{"hash": "def5678", "message": "commit message", "type": "bugfix"},
{"hash": "ghi9012", "message": "commit message", "type": "feature"}
],
"verification": {
"final_state_matches": true,
"backup_branch": "backup-original",
"reordered_branch": "reordered-history"
}
}
Commit Classification:
Constraints: