capnfabs / grouse

A diff tool for Hugo static sites.
https://capnfabs.net/posts/grouse-diff-tool-hugo-static-site-generators/
MIT License
13 stars 2 forks source link

Rework Checkout Mechanism to use `git worktree`. #3

Closed capnfabs closed 4 years ago

capnfabs commented 4 years ago

I was on the fence about whether I should do this or hand-roll my own checkout code when I first built Grouse. Since then:

That code was also super fiddly and hard to get right, and is badly tested? So with the benefit of hindsight, I'm inclined to try and replace it with the simpler solution.

Something important to check here: not all git versions support multiple worktrees, and there's a big scary warning in the worktree docs saying:

Multiple checkout in general is still experimental, and the support for submodules is incomplete. It is NOT recommended to make multiple checkouts of a superproject.

I wish the author had written why 😅 But it looks like a few brave souls have figured out exactly what the underlying issues are

So, steps for this task:

Then, once those investigative tasks are done: