Skip to content

Fix the local benchmark, clean up keys from a failed init, and stale v6 paths - #22

Merged
hmirin merged 1 commit into
mainfrom
fix/small-fixes
Oct 28, 2026
Merged

hmirin merged 1 commit into
mainfrom
fix/small-fixes

Conversation

@hmirin

@hmirin hmirin commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Small bugs found while doing steps 3 and 4.

  • scripts/benchmark-local.sh stopped partway. It counted files in storage/policies, a directory that format 5 and later never create, so set -e killed the run. The count and the policy_files summary field are removed. Verified by running it on a one-commit repository: exit 0. ~/.config/git-e2ee and ~/.local/state/git-e2ee were not created.
  • git-e2ee init left an orphaned key on failure. If storage setup failed after init generated a key (for example, storage already initialized), the new key file stayed behind. init now deletes a key it created in the same run before returning the error. A key the user passed with --key that already existed is never touched. New test failed_init_removes_the_key_it_created: a second init on the same storage fails, and exactly one key remains.
  • scripts/benchmark-comparison.sh snapshot path. It snapshotted storage/objects, which format 6 renamed to packs/. The old objects/ held packs only, so the check covers the same data. bash -n only; the script was not run end to end.
  • docs/benchmarks.md. The recorded run's refs/heads/git-remote-e2ee and e2ee/** -delta stay as historical facts. A note after them says format 6 uses main and * -delta at the branch root.

cargo fmt --check, cargo clippy --all-targets -- -D warnings, cargo test --all-targets (141 passed).

…v6 paths

- scripts/benchmark-local.sh counted files in storage/policies, which format
  5 and later never create, so it stopped under set -e. The count and its
  summary field are removed.
- git-e2ee init deletes a key it generated in the same run when a later step
  fails, instead of leaving an orphaned key file. A key the user passed is
  never touched.
- scripts/benchmark-comparison.sh snapshotted storage/objects, which format 6
  renamed to packs/.
- docs/benchmarks.md notes that its recorded run used the old carrier branch
  and attributes, and what format 6 uses instead.
@hmirin
hmirin merged commit c228b27 into main Oct 28, 2026
1 check passed
@hmirin
hmirin deleted the fix/small-fixes branch October 29, 2026 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant