Support upstream pass Git diff configuration and avoid Git for read-only TOTP #62
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Make OTP access compatible with real upstream pass repositories, including current Homebrew pass installations on macOS.
Reproduction
An otherwise valid pass repository contains the common Git configuration:
Upstream pass show and IronStorage show can decrypt the entry, but ironstorage otp code ENTRY fails before OTP parsing because the CLI eagerly opens embedded Git. crates/storage/src/git.rs rejects every diff section as a possible executable helper. The no-Git OTP fixture does not exercise this case.
Required implementation
Acceptance criteria
Implemented and pushed in
c86ea9e.The storage OTP API now decrypts and parses the entry before deciding whether Git is needed. Read-only TOTP generation does not open a repository; HOTP still creates the storage-owned automatic committer, advances the counter, re-encrypts, and commits atomically.
Embedded Git validation now accepts and preserves the passive diff.gpg configuration written by upstream pass, including binary and textconv, while IronStorage never executes that helper. The public config mutation API still rejects diff drivers, and executable filter, merge, include, credential, protocol, URL rewrite, hook, SSH, proxy, and fsmonitor configuration remains rejected.
Compatibility coverage uses an upstream-style pass Git config fixture. Tests prove TOTP leaves ciphertext, config, and history byte-identical; HOTP increments and commits; forbidden helper config is ignored by TOTP but still blocks mutation; and CLI show plus otp code work in the same Git-backed fixture store.
Upstream behavior was audited against the current password-store source: https://git.zx2c4.com/password-store/tree/src/password-store.sh
Verification passed: