Repository navigation
Port the history rewrite tool out of drover as a standalone binary - #2
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1
For humans
What changed
src/plan.rsis copied verbatim from drover'scompact/plan.rs.src/write.rsandsrc/push.rsare ported off drover's Runner onto plain processes.src/main.rsholds the CLI, readiness, cards, report and reset.tests/compact.rsports drover'scrates/cli/tests/compact.rssim end to end: the real binary and real git, with fakeghanddroveron PATH. It adds lane-folder, check-lane, spent-card and date-cut cases..github/workflows/ci.yml(fmt, clippy -D warnings, tests)..gitignorehas/target*/.Decisions
At 39407e8e6, drover's CLI exposes none of its event log, so the drover-state parts work like this:
COMPACT_UNAPPROVED):--pushreadsdrover thread show <thread> --json. A card with exactly its command must have drover's "approved by owner, running in" line and no "ran in" line. The card command therefore carries--thread.--fleet <name>readsdrover status <fleet> --jsonfor review or verify states.--lane [host:]path. A lane is "dirty" when it has tracked changes or unpushed commits. Untracked files don't count:reset --keepnever touches them, and drover's own lane files are untracked.--savedtakes drover's stored ids as a TSV. The dry run prints the same "events" lines, and the push writesmoved.json(and an undo writesundone) for drover to log as itscompacted/compact-undonerecords. The list of which fields are saved (SAVED/KEPT) and its source-scan CI guard scan drover's own sources, so they stay in drover and belong to the follow-up removal issue.drover pausefirst.crates/cli/tests/compaction.rstests drover's event-log archiving (archive-events), not this tool, so it was not ported.Evidence (head fafb193)
cargo fmt --check→ exit 0cargo clippy --locked --all-targets -- -D warnings→ exit 0cargo test --locked→ exit 0 (2 passed)--cut <sha> --dry-runon that same repo.diff drover.out compact.out→ exit 0, byte-identical, every sha included.src/ net +1498 (budget: none stated): it ports drover's 1474 lines plus the argument and drover-CLI plumbing.