Conversation
c167eab to
0ad0219
Compare
jonathanlab
left a comment
There was a problem hiding this comment.
nice, lgtm! wonder if we could do with some docs about this as well
| this.git.raw(["worktree", "add", "-b", branchName, worktreePath, base]), | ||
| this.git.raw([ | ||
| "-c", | ||
| "core.hooksPath=/dev/null", |
There was a problem hiding this comment.
nit: I assume this is to circumvent the husky hooks in the posthog/posthog repository right? Do we want to make it configurable if these hooks are enabled/disabled? Totally up to you
There was a problem hiding this comment.
yes, but not to circumvent, just to delay
we still run these later -- we just skip them here so the worktreeinclude and worktreelink processes can complete first, as the hooks may depend on them (ours do)
|
Also would be awesome if we could let users config this in the Worktree settings page, but thats for another PR :D |
0ad0219 to
36efabf
Compare
|
@jonathanlab agree! if this works out, i'll take another pass to imrpove the UX a bit:
|
36efabf to
3535242
Compare
## Problem this PR adds support for `.worktreeinclude` and `.worktreelink` in posthog code: PostHog/code#1344 and we want posthog worktrees to be easy in posthog code :) <!-- Who are we building for, what are their needs, why is this important? --> <!-- Does this fix an issue? Uncomment the line below with the issue ID to automatically close it when merged --> <!-- Closes #ISSUE_ID --> ## Changes - adds `.worktreeinclude`, `.worktreelink`, and posthog code env setup script to the posthog main repo - adds a cache layer to the flox claude setup hook <!-- If there are frontend changes, please include screenshots. --> <!-- If a reference design was involved, include a link to the relevant Figma frame! --> ## How did you test this code? manual testing worktrees are working smoothly in posthog code with the posthog main repo now <!-- Briefly describe the steps you took. --> <!-- Include automated tests if possible, otherwise describe the manual testing routine. --> <!-- If you are an agent writing this, do NOT include manual tasks you have NOT completed. You can clearly outline you're simply an agent and you haven't tested this manually except for code-based unit/integration tests --> 👉 _Stay up-to-date with_ [_PostHog coding conventions_](https://posthog.com/docs/contribute/coding-conventions) _for a smoother review._ ## Publish to changelog? <!-- For features only --> <!-- If publishing, you must provide changelog details in the #changelog Slack channel. You will receive a follow-up PR comment or notification. --> <!-- If not, write "no" or "do not publish to changelog" to explicitly opt-out of posting to #changelog. Removing this entire section will not prevent posting. --> ## Docs update <!-- Add the `skip-inkeep-docs` label if this PR should not trigger an automatic docs update from the Inkeep agent. --> <!-- ## 🤖 LLM context --> <!-- If an LLM agent co-authored or authored this PR, uncomment this section and leave any relevant context about the session, tools used, link to the session, or anything else that may help reviewers. -->

Problem
tragically, i think we really should make worktrees work well
Changes
less tragically, i think this small change makes it all better :)
.worktreeincludeand.worktreelinkfilesincludecopies files andlinksymlinks filesHow did you test this?
added these tiny pieces to the main repo, and it all works pretty smoothly: https://app.graphite.com/github/pr/PostHog/posthog/52566