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
910## Problem
1112Today, 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.
1314In this context the pipeline is not good ordered and plugins making commits for other plugins is not respected.
1516## solution
1718The 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.
1920Some plugins don't need to do that, so they can skeep that.
2122Some 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...).
2324Ideally, 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).