Skip to content

Commit 555612e

Browse files
committed
refactor(nix): trim hook reinstall comment
1 parent 2132c2f commit 555612e

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

‎nix/dev-shell.nix‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,8 @@ in
108108
${lib.getExe config.packages.syncAgentSkills}
109109
${config.pre-commit.shellHook}
110110
111-
# The hooks live in the git common dir, so every worktree shares them,
112-
# but each reads its worktree's untracked config symlink. A worktree
113-
# whose dev shell has never loaded has no such symlink, and without
114-
# `--allow-missing-config` every commit there aborts. git-hooks.nix has
115-
# no option for the flag, so reinstall with it, comparing before writing
116-
# as git-hooks.nix does.
111+
# Hooks are shared across worktrees, but the config symlink only exists
112+
# where this shell has loaded; git-hooks.nix cannot pass this flag.
117113
for stage in ${lib.escapeShellArgs config.pre-commit.settings.installStages}; do
118114
hookFile=$(${lib.getExe config.pre-commit.settings.gitPackage} rev-parse --path-format=absolute --git-path "hooks/$stage")
119115
if ! grep -q -- --skip-on-missing-config "$hookFile" 2>/dev/null; then

0 commit comments

Comments
 (0)