From 01c2ce5de49c6a0c1bd0386faa576fd43870f56a Mon Sep 17 00:00:00 2001 From: James Ross Date: Tue, 15 Sep 2026 19:01:33 -0700 Subject: [PATCH] fix: make install copies the script instead of symlinking the checkout A symlink into the development checkout made every uncommitted edit live for every consumer on the machine. While the v0.2.1 refactor sat half-fixed on a branch between 18:19 and 18:31 PDT, a downstream project's pre-commit hook ran that script and its fixture's lock step failed once; the same job landed on rerun after the branch was committed. `install -m 0755` now puts a snapshot in $(PREFIX)/bin; re-run make install to upgrade. Version 0.2.2. --- CHANGELOG.md | 6 ++++++ Makefile | 2 +- README.md | 4 +++- bin/git-locks | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9413205..d844a0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project are recorded here. The format follows Keep a ## [Unreleased] +## [0.2.2] - 2026-09-15 + +### Changed + +- `make install` copies `bin/git-locks` into `$(PREFIX)/bin` instead of symlinking it. The symlink made the development checkout live for every consumer on the machine: while the v0.2.1 refactor was in progress on a branch, a downstream project's pre-commit hook ran the half-fixed script and its lock step failed once. An installed binary is now a snapshot of the checkout it was installed from; upgrade by re-running `make install`. + ## [0.2.1] - 2026-09-15 ### Changed diff --git a/Makefile b/Makefile index 05dc917..2e5c37f 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ test: install: mkdir -p $(PREFIX)/bin - ln -sf $(CURDIR)/bin/git-locks $(PREFIX)/bin/git-locks + install -m 0755 bin/git-locks $(PREFIX)/bin/git-locks uninstall: rm -f $(PREFIX)/bin/git-locks diff --git a/README.md b/README.md index e39cb81..4fe18f0 100644 --- a/README.md +++ b/README.md @@ -403,10 +403,12 @@ Paths are repo-relative, `./` prefixes are stripped, and absolute or `..` paths ## Install ```sh -make install # symlinks bin/git-locks into ~/.local/bin +make install # copies bin/git-locks into ~/.local/bin (a snapshot of this checkout, on purpose) git locks list # git dispatches `git locks` to git-locks on PATH ``` +`make install` copies rather than symlinks. A symlink into a development checkout makes every uncommitted edit live for every consumer on the machine at once; on 2026-09-15 that turned a half-finished refactor into a transient lock failure in another project's pre-commit hook. Install from a tagged checkout and re-run `make install` when you mean to upgrade. + ## Develop ```sh diff --git a/bin/git-locks b/bin/git-locks index f39c1bf..454caa2 100755 --- a/bin/git-locks +++ b/bin/git-locks @@ -50,7 +50,7 @@ export LC_ALL=C # string offsets below are byte offsets: cat-file --batch sizes NS='refs/locks' DEFAULT_TTL=14400 SCHEMA='git-locks/1' -VERSION='0.2.1' +VERSION='0.2.2' TEXT=0 # 1 after --text: human lines instead of JSONL usage_text() {