From 95760ff8bbacaf1629c4a5db1439e97ef99590cc Mon Sep 17 00:00:00 2001 From: David F Glidden Date: Fri, 17 Apr 2026 14:19:37 +0200 Subject: [PATCH] Remove global git-lfs hooks from dotfiles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The four hooks (post-checkout, post-commit, post-merge, pre-push) were generic git-lfs boilerplate that called 'git lfs ' for each event. Under the global core.hooksPath, they required git-lfs on PATH at every git invocation — which broke under launchd's stripped PATH (discovered 2026-04-16 while fixing gitvault). A repo that actually uses LFS can install its local hooks via 'git lfs install' within the repo (.git/hooks/*). The global hookspath shouldn't require LFS to be present. Co-Authored-By: Claude Opus 4.7 (1M context) --- git/hooks/post-checkout | 3 --- git/hooks/post-commit | 3 --- git/hooks/post-merge | 3 --- git/hooks/pre-push | 3 --- 4 files changed, 12 deletions(-) delete mode 100755 git/hooks/post-checkout delete mode 100755 git/hooks/post-commit delete mode 100755 git/hooks/post-merge delete mode 100755 git/hooks/pre-push diff --git a/git/hooks/post-checkout b/git/hooks/post-checkout deleted file mode 100755 index 5abf8ed..0000000 --- a/git/hooks/post-checkout +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -command -v git-lfs >/dev/null 2>&1 || { printf >&2 "\n%s\n\n" "This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-checkout' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks')."; exit 2; } -git lfs post-checkout "$@" diff --git a/git/hooks/post-commit b/git/hooks/post-commit deleted file mode 100755 index b8b76c2..0000000 --- a/git/hooks/post-commit +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -command -v git-lfs >/dev/null 2>&1 || { printf >&2 "\n%s\n\n" "This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-commit' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks')."; exit 2; } -git lfs post-commit "$@" diff --git a/git/hooks/post-merge b/git/hooks/post-merge deleted file mode 100755 index 726f909..0000000 --- a/git/hooks/post-merge +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -command -v git-lfs >/dev/null 2>&1 || { printf >&2 "\n%s\n\n" "This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-merge' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks')."; exit 2; } -git lfs post-merge "$@" diff --git a/git/hooks/pre-push b/git/hooks/pre-push deleted file mode 100755 index 5f26dc4..0000000 --- a/git/hooks/pre-push +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -command -v git-lfs >/dev/null 2>&1 || { printf >&2 "\n%s\n\n" "This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'pre-push' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks')."; exit 2; } -git lfs pre-push "$@"