Repository navigation
Conversation
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
The clean filter failed on the first `git add` in a repository without ahy commits. `get_file_contents` now reports an unborn or missing HEAD, and a path that is not a blob in HEAD, as `NotExist`, so clean encrypts the file fresh instead of aborting or panicking.
Identities were implicitly listed with a glob lookup, so any config key containing "identity" (e.g. `advice.implicitIdentity=false`) was used as an identity path and broke checkout. `list_config` now reads only the exact key, and GitConfig::list uses the full `git-agecrypt.config.identity` key like `add` and `remove` already did.
Cache file names were derived by replacing '/' with '!' and then replacing the extension, so files such as a.json/a.yaml shared an entry and could be committed encrypted to each other's recipients. Each path now has one entry under .git/git-agecrypt/v2/, named by the blake3 hash of the path and holding the plaintext hash, a recipient fingerprint and the ciphertext.
The clean filter reused cached or HEAD ciphertext whenever the plaintext was unchanged, so adding or removing recipients in git-agecrypt.toml never reached existing files and removed recipients' access remained. Ciphertext is now reused only if the stored recipient fingerprint matches the current configuration, so `git add --renormalize .` re-encrypts affected files. Smudge also records the current fingerprint so fresh checkouts don't produce spurious changes.
The unit-test fixtures spawned `git` with the host environment, so a leaked GIT_DIR (as exported to hooks) redirected `git init`, `git config` and `git commit` away from the temp repository, and the host's missing init.defaultBranch printed hints on every run. Spawn `git` through a Sandbox fixture that clears the environment, keeps PATH, and points HOME at a temp dir whose .gitconfig provides the author identity and default branch. This replaces the per-test `git config user.*` calls and the last use of duct, which is dropped.
test_config walked eight config behaviours in a single sequence, so the first failing assertion hid the state of every later one. Each behaviour now sets up its own state in a fresh repository; the assertions are unchanged.
Sandbox::command clears the environment, so under cargo llvm-cov the instrumented git-agecrypt run by git as a filter wrote default_*.profraw into the test repository. fresh_clone_renormalize_produces_no_changes then saw them as untracked files, and the binary's coverage was lost.
…ggered release A v* tag whose version matches Cargo.toml publishes to crates.io through trusted publishing, unless that version is already published, and creates or updates the GitHub Release with the matching CHANGELOG.md section.
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.
Fixes #8