Commit 88c0fa20fbbf

Vincent Demeester <vincent@sbr.pm>
2026-01-20 23:07:41
fix(nix-flake-updater): skip git-lfs when creating worktrees
The post-checkout hook was failing because git-lfs wasn't found: "This repository is configured for Git LFS but 'git-lfs' was not found" Since LFS files (one screenshot) aren't needed for builds, skip LFS entirely by setting GIT_LFS_SKIP_SMUDGE=1 when creating worktrees. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent e0f99af
Changed files (1)
tools
nix-flake-update
tools/nix-flake-update/nix-flake-update.sh
@@ -87,9 +87,9 @@ if git show-ref --verify --quiet "refs/heads/$BRANCH_NAME"; then
   BRANCH_NAME="$BRANCH_PREFIX$(date +%Y%m%d-%H%M%S)"
 fi
 
-# Create worktree from main branch
+# Create worktree from main branch (skip LFS to avoid hook failures)
 log "Creating worktree at $WORKTREE_DIR from $GIT_REMOTE/main"
-git worktree add "$WORKTREE_DIR" "$GIT_REMOTE/main"
+GIT_LFS_SKIP_SMUDGE=1 git worktree add "$WORKTREE_DIR" "$GIT_REMOTE/main"
 
 # Switch to worktree
 cd "$WORKTREE_DIR"