Releases: JSpatim/git-valet
v0.2.2
v0.2.1
Bug fix
Fix: clear inherited git env vars in sgit() to prevent index corruption
When git-valet runs inside a git hook (pre-commit, pre-push), git sets env vars like GIT_INDEX_FILE pointing to the main repo's index. The sgit() function spawns git subprocesses with --git-dir/--work-tree for the valet bare repo, but inherited env vars override these flags, causing valet operations to read/write the main repo's index instead of the valet's.
This corrupts the main repo index with blob references that only exist in the valet's object database, making subsequent commits fail with:
error: invalid object 100644 <sha> for '<file>'
error: Error building trees
Fix: env_remove the following vars before spawning valet git commands:
GIT_INDEX_FILEGIT_DIRGIT_WORK_TREEGIT_OBJECT_DIRECTORYGIT_ALTERNATE_OBJECT_DIRECTORIES
Upgrade
cargo install git-valetIf you hit the corruption bug, repair with:
rm ~/.git-valets/<project-id>/repo.git/index
git valet syncv0.2.0
What's new
Comprehensive code quality, security, and cross-platform improvements.
Features
- Shell completions —
git valet completions bash/zsh/fish/powershell - NO_COLOR support — respects the no-color.org standard
- Path traversal protection — rejects
.., absolute paths, and normalizes\to/
Improvements
- Rust edition 2024, MSRV 1.85
- Clippy pedantic lints enabled,
unsafe_codeforbidden - All
.unwrap()removed from production code - Replaced
sha2+hexwithblake3(faster, smaller) - Added
duncefor safe Windows path handling (no\?\UNC paths) - Extracted
lib.rsfor better testability - Release profile: LTO, strip, single codegen unit (smaller binary)
- Git command exit codes now properly checked everywhere
- CRLF-safe hook shebang handling
CI
- Fixed branch triggers (
main->master) - Added
cargo fmt --checkand MSRV verification job - Multi-platform: Linux, macOS, Windows
Tests
- 40 tests (was 28): unit, integration, and CLI end-to-end
- Added
assert_cmd+predicatesfor CLI testing
Install
cargo install git-valet
Full changelog: v0.1.0...v0.2.0
v0.1.0 — Initial release
First public release of git-valet (formerly git-aside).
git-valet transparently versions private files (.env, secrets, notes, AI prompts) in a separate private repo, synced via git hooks with zero workflow change.
Features
git valet init— Initialize a valet repo for your projectgit valet sync— Manual sync (add + commit + push)git valet status— Show valet repo status- Transparent hooks: pre-commit, pre-push, post-merge, post-checkout
- Per-project config stored in
~/.git-valets/
Install
cargo install --git https://github.com/JSpatim/git-valet