dherreraj
e6193ab816
fix(hooks): run the rebuild from the checkout's top level ( #3258 )
...
The rebuild bodies read graphify-out/ and its .graphify_root relative to
the cwd, but git does not always start hooks at the top level. With
GIT_DIR exported and no GIT_WORK_TREE (a nested git call from another
hook or tool), git takes the caller's cwd as the work tree and
`git rev-parse --show-toplevel` echoes that subdirectory. A stray
graphify-out/ left there by an earlier run then roots the rebuild at the
subdirectory; for .claude/worktrees/ that walks every linked worktree.
The #3265 guard rejects a `..` marker, but its fallback is the same cwd.
Add a shared _TOPLEVEL_ANCHOR snippet right after _WORKTREE_GUARD in all
four hooks. In the standard layout it cds to the parent of the absolute
common .git dir; with GIT_WORK_TREE or a separate git dir it keeps git's
own --show-toplevel. GIT_DIR is rewritten to its absolute form so later
git calls still resolve. The block already runs in a subshell, so the cd
does not leak into chained hooks.
2026-10-22 19:38:39 -05:00
..
2026-04-04 18:52:44 +01:00
2026-10-13 10:27:02 +01:00
2026-10-20 10:35:23 +01:00
2026-10-09 19:18:06 +01:00
2026-10-16 17:10:31 +01:00
2026-10-16 17:10:31 +01:00
2026-10-12 14:49:28 +01:00
2026-10-16 18:25:28 +01:00
2026-10-12 23:02:50 +01:00
2026-08-06 17:29:18 +01:00
2026-05-17 11:32:38 +01:00
2026-10-13 22:21:43 +01:00
2026-10-12 14:49:28 +01:00
2026-10-16 18:25:28 +01:00
2026-10-22 13:16:25 +01:00
2026-10-09 02:48:22 +01:00
2026-10-16 17:14:07 +01:00
2026-10-11 21:07:15 +01:00
2026-10-06 20:54:55 +01:00
2026-09-27 18:56:31 +01:00
2026-10-13 11:14:16 +01:00
2026-10-22 13:46:54 +01:00
2026-10-02 16:50:45 +01:00
2026-10-20 10:35:24 +01:00
2026-10-13 22:21:48 +01:00
2026-10-13 22:21:48 +01:00
2026-10-13 11:14:16 +01:00
2026-10-13 22:21:48 +01:00
2026-10-13 22:21:48 +01:00
2026-10-13 22:21:48 +01:00
2026-10-13 22:21:43 +01:00
2026-10-12 14:50:32 +01:00
2026-10-13 22:21:48 +01:00
2026-10-12 22:37:55 +01:00
2026-10-16 18:21:28 +01:00
2026-10-13 22:21:43 +01:00
2026-10-20 11:28:07 +01:00
2026-10-12 22:58:40 +01:00
2026-10-10 21:20:29 +01:00
2026-10-20 10:50:37 +01:00
2026-10-14 22:53:26 +01:00
2026-10-22 13:46:54 +01:00
2026-10-20 11:28:07 +01:00
2026-10-16 18:21:28 +01:00
2026-06-28 16:57:00 +01:00
2026-06-18 01:55:56 +01:00
2026-10-14 22:31:57 +01:00
2026-10-13 22:53:44 +01:00
2026-10-12 22:37:54 +01:00
2026-09-22 14:58:12 +01:00
2026-10-13 11:14:22 +01:00
2026-10-16 17:12:53 +01:00
2026-10-22 13:46:54 +01:00
2026-10-09 19:46:57 +01:00
2026-10-13 10:26:57 +01:00
2026-10-13 10:26:57 +01:00
2026-10-16 17:10:31 +01:00
2026-10-22 19:38:39 -05:00
2026-10-12 14:49:28 +01:00
2026-08-17 19:00:46 +01:00
2026-10-13 11:14:16 +01:00
2026-10-14 22:31:57 +01:00
2026-08-15 20:11:13 +01:00
2026-08-05 01:41:12 +01:00
2026-10-22 13:12:56 +01:00
2026-10-12 22:37:54 +01:00
2026-10-12 22:37:54 +01:00
2026-10-09 19:18:06 +01:00
2026-07-06 16:43:21 +01:00
2026-10-22 13:12:56 +01:00
2026-09-09 17:20:54 +01:00
2026-10-12 23:02:44 +01:00
2026-10-12 23:02:50 +01:00
2026-10-16 17:10:31 +01:00
2026-10-21 19:33:01 +01:00
2026-10-16 17:11:41 +01:00
2026-10-21 19:33:10 +01:00
2026-10-13 11:14:16 +01:00
2026-10-20 10:35:23 +01:00
2026-10-20 10:35:22 +01:00
2026-10-20 10:35:22 +01:00
2026-10-20 11:28:04 +01:00
2026-10-16 17:10:31 +01:00
2026-07-04 22:12:47 +01:00
2026-10-20 14:57:06 +01:00
2026-10-12 22:58:40 +01:00
2026-10-21 19:33:01 +01:00
2026-10-22 13:46:52 +01:00
2026-10-13 22:53:44 +01:00
2026-09-17 11:01:37 +01:00
2026-10-22 13:48:14 +01:00
2026-08-01 11:36:30 +01:00
2026-10-13 11:16:15 +01:00
2026-10-22 13:46:53 +01:00
2026-10-22 13:13:03 +01:00
2026-10-13 11:14:16 +01:00
2026-09-26 13:45:58 +01:00
2026-10-14 22:53:26 +01:00
2026-10-14 22:53:26 +01:00
2026-10-20 11:28:03 +01:00
2026-10-22 13:46:54 +01:00
2026-08-08 23:37:49 +01:00
2026-10-05 19:40:04 +01:00
2026-08-11 14:40:01 +01:00
2026-10-20 11:28:05 +01:00
2026-09-17 11:01:38 +01:00
2026-10-05 19:40:12 +01:00
2026-10-12 14:49:34 +01:00
2026-10-22 13:46:54 +01:00
2026-10-13 11:14:30 +01:00
2026-10-13 10:27:02 +01:00
2026-10-20 10:50:36 +01:00
2026-10-12 22:37:54 +01:00
2026-10-12 22:37:55 +01:00
2026-10-08 14:28:20 +01:00
2026-10-20 10:55:51 +01:00
2026-10-12 13:02:22 +01:00
2026-10-16 17:11:42 +01:00
2026-10-12 22:37:54 +01:00
2026-10-16 17:11:41 +01:00
2026-10-13 22:53:44 +01:00
2026-10-12 22:58:40 +01:00
2026-10-20 10:53:04 +01:00
2026-07-06 12:36:12 +01:00
2026-10-05 20:11:30 +01:00
2026-10-16 17:12:53 +01:00
2026-10-20 10:35:37 +01:00
2026-10-13 11:14:16 +01:00
2026-10-21 19:32:46 +01:00
2026-07-18 19:09:53 +01:00
2026-10-22 13:12:57 +01:00
2026-10-22 13:47:04 +01:00
2026-10-20 11:28:03 +01:00
2026-10-16 17:13:49 +01:00
2026-10-20 16:56:09 +01:00
2026-10-16 17:13:54 +01:00
2026-10-12 14:49:29 +01:00
2026-10-20 16:56:09 +01:00
2026-10-20 15:40:39 +01:00
2026-10-16 17:12:42 +01:00
2026-10-22 13:49:38 +01:00
2026-10-22 13:48:29 +01:00
2026-10-22 13:47:26 +01:00
2026-10-13 11:14:16 +01:00
2026-10-20 10:35:25 +01:00
2026-10-13 11:14:16 +01:00
2026-10-12 22:37:54 +01:00
2026-07-02 22:38:28 +01:00
2026-10-22 13:46:54 +01:00
2026-10-12 23:02:50 +01:00
2026-10-14 22:53:26 +01:00
2026-10-12 22:58:40 +01:00