Skip to content

Revive - #11

Merged
vlaci merged 19 commits into
mainfrom
revive
Oct 18, 2026
Merged

vlaci merged 19 commits into
mainfrom
revive

Conversation

@vlaci

@vlaci vlaci commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Fixes #8

@codecov-commenter

Copy link
Copy Markdown

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 ☂️

vlaci and others added 19 commits October 18, 2026 19:46
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.
@vlaci
vlaci merged commit ad875d8 into main Oct 18, 2026
4 checks passed
@vlaci
vlaci deleted the revive branch October 18, 2026 17:48
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.

2 participants