From c8603fb3ce3ec73411ee3abd8666f58a86ee3e30 Mon Sep 17 00:00:00 2001 From: Trey Moen <50057480+greatgitsby@users.noreply.github.com> Date: Fri, 4 Sep 2026 21:09:40 -0700 Subject: [PATCH] op: point git-lfs config at the vendored binary (#38775) git-lfs is vendored in the venv, but `git lfs install` writes filters and hooks that invoke a bare `git-lfs`, which is only on PATH inside the venv. With filter.lfs.required set, any checkout from a plain shell fails. git runs filters and hooks from the worktree root, so a relative path into the venv resolves from anywhere. --- tools/op.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/op.sh b/tools/op.sh index 43c88a2a86..a77c386e49 100755 --- a/tools/op.sh +++ b/tools/op.sh @@ -222,6 +222,12 @@ EOF echo "Pulling git lfs files..." st="$(date +%s)" + git config --local filter.lfs.clean ".venv/bin/git-lfs clean -- %f" + git config --local filter.lfs.smudge ".venv/bin/git-lfs smudge -- %f" + git config --local filter.lfs.process ".venv/bin/git-lfs filter-process" + git config --local filter.lfs.required true + printf '#!/bin/sh\nexec .venv/bin/git-lfs pre-push "$@"\n' > "$(git rev-parse --git-path hooks)/pre-push" + chmod +x "$(git rev-parse --git-path hooks)/pre-push" if ! retry 3 git lfs pull; then echo -e " ↳ [${RED}✗${NC}] Pulling git lfs files failed!" return 1