GitRoot

Craft your forge // Build your project // Grow your community freely
 1---
 2id: "41b5"
 3priority: 98
 4assignee: null
 5status: v0.6.0
 6---
 7
 8# Plugin-sdk wortree rework
 9
10## Problem
11
12Today, when we change a plugin conf, GitRoot make a `worktree` pass: go through each files and call plugin with init:worktree. After, that pass all others plugins are called with a standard `diff` pass.
13
14In this context the pipeline is not good ordered and plugins making commits for other plugins is not respected.
15
16## solution
17
18The true solution is to call all plugins in right order, give the information of `confHasChanged` to the plugins with a changing conf. Then all plugins, can, if they need, ask for a `worktree` pass with a new sdk api.
19
20Some plugins don't need to do that, so they can skeep that.
21
22Some plugins could requiered a `worktree` even outside of a conf change, for example, silo could do that on new branch (even if a better solution for silo could be a better cache based on commits...).
23
24Ideally, the plugin could receive `previousConf` and `newConf` to be able to decide if a worktree is really necessary (because it's expensive and should be used only in last case).