GitRoot

Craft your forge, Build your project, Grow your community freely

Test GitRoot on GitRoot

Use Hop plugin to test gitroot on gitroot.dev


Please review changes with:

1git fetch origin make_hop_working
2git checkout make_hop_working
3git diff origin/HEAD..HEAD

Make your changes about the code inside the code directly (remarks, questions can be made in the form of comments). General remarks on the why can be made here. When done commit and push directly on this branch. Graft plugin will make the diff and display it here.

When then changes are ready to be merged, change the status from ‘status: review’ to ‘status: merge’.


Push 1 commit

:green_heart: make hop working

(9740cca66ea4768bbce05373cd9b8dee27176c30)

 1--- a/.gitroot/users.yml
 2+++ b/.gitroot/users.yml
 3@@ -36,6 +36,7 @@
 4   - name: ladybugDeleteBreakLine
 5   - name: apexLineAndBetterDiff
 6   - name: startBlog
 7+  - name: make_hop_working
 8   users:
 9   - pseudo: GitRoot
10     avatar: ""
11@@ -130,3 +131,13 @@
12     ssh:
13     - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHk+AMq9/FbuwoJXJ1xoClIOtucWwY3+KX0bcnwXMVNm
14     - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRvLg59zboyF8SzGlGhAXnMUvLUfXzsdddxVp1LvK0TAIwvw/4gvFXUrcNihYLuBl86MYam8osFT/nEddjs5eGve1rNGvtHN9yyKXfjZvuZ2V5KQLEW4k6LEEypFWrpGlKdSMdZoHYSv2gqqSVrvQkhBD1QaIb+xuEG1w3aC1E/DbZxMPoFa+CFRz0oPMnKGaimCK/sV0a7aPYCEC9lJ97gfA1AUlbzIq8GbD/jKWW4+dIzxkmHeAqlwVygn4dhgI5KHTjA0U5b4RcG1k0BpMxhDtQR53tDWlWydgoKxJUGVRx1J+dBuDcb1NB/JttLovU2usX+NQNh1+lcJ1klKK3
15+make_hop_working:
16+  branches:
17+  - name: make_hop_working
18+  users:
19+  - pseudo: ""
20+    avatar: ""
21+    emails:
22+    - ""
23+    ssh:
24+    - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHk+AMq9/FbuwoJXJ1xoClIOtucWwY3+KX0bcnwXMVNm
 1--- a/app/plugins/apex/branch_test.go
 2+++ b/app/plugins/apex/branch_test.go
 3@@ -15,17 +15,17 @@
 4 	"gitroot.dev/libs/golang/plugin/test"
 5 )
 6
 7-var firstRender = `<li data-hash="aaaa" data-parent-hash="0000000000000000000000000000000000000000"><code title="aaaa">aaaa</code> - <span title="first">first</span> <i style="font-size:small;float:right;">(Thu Jan  1 01:00:00 1970) &lt;moi&gt;</i></li>`
 8-var secondRender = `<li data-hash="bbbb" data-parent-hash="aaaa"><code title="bbbb">bbbb</code> - <span title="second">second</span> <i style="font-size:small;float:right;">(Thu Jan  1 01:00:00 1970) &lt;moi&gt;</i></li>
 9-<li data-hash="aaaa" data-parent-hash="0000000000000000000000000000000000000000"><code title="aaaa">aaaa</code> - <span title="first">first</span> <i style="font-size:small;float:right;">(Thu Jan  1 01:00:00 1970) &lt;moi&gt;</i></li>`
10-var thirdRender = `<li data-hash="dddd" data-parent-hash="cccc"><code title="dddd">dddd</code> - <span title="four">four</span> <i style="font-size:small;float:right;">(Thu Jan  1 01:00:00 1970) &lt;moi&gt;</i></li>
11+var firstRender = `<li data-hash="aaaa" data-parent-hash="0000000000000000000000000000000000000000"><code title="aaaa">aaaa</code> - <span title="first">first</span> <i style="font-size:small;float:right;">(Wed Feb 12 14:33:00 1986) &lt;moi&gt;</i></li>`
12+var secondRender = `<li data-hash="bbbb" data-parent-hash="aaaa"><code title="bbbb">bbbb</code> - <span title="second">second</span> <i style="font-size:small;float:right;">(Wed Feb 12 14:33:00 1986) &lt;moi&gt;</i></li>
13+<li data-hash="aaaa" data-parent-hash="0000000000000000000000000000000000000000"><code title="aaaa">aaaa</code> - <span title="first">first</span> <i style="font-size:small;float:right;">(Wed Feb 12 14:33:00 1986) &lt;moi&gt;</i></li>`
14+var thirdRender = `<li data-hash="dddd" data-parent-hash="cccc"><code title="dddd">dddd</code> - <span title="four">four</span> <i style="font-size:small;float:right;">(Wed Feb 12 14:33:00 1986) &lt;moi&gt;</i></li>
15 <li data-hash="cccc"><code title="cccc">cccc</code> - <i>commit not found</i></li>
16-<li data-hash="bbbb" data-parent-hash="aaaa"><code title="bbbb">bbbb</code> - <span title="second">second</span> <i style="font-size:small;float:right;">(Thu Jan  1 01:00:00 1970) &lt;moi&gt;</i></li>
17-<li data-hash="aaaa" data-parent-hash="0000000000000000000000000000000000000000"><code title="aaaa">aaaa</code> - <span title="first">first</span> <i style="font-size:small;float:right;">(Thu Jan  1 01:00:00 1970) &lt;moi&gt;</i></li>`
18-var fourRender = `<li data-hash="dddd" data-parent-hash="cccc"><code title="dddd">dddd</code> - <span title="four">four</span> <i style="font-size:small;float:right;">(Thu Jan  1 01:00:00 1970) &lt;moi&gt;</i></li>
19-<li data-hash="cccc" data-parent-hash="bbbb"><code title="cccc">cccc</code> - <span title="third">third</span> <i style="font-size:small;float:right;">(Thu Jan  1 01:00:00 1970) &lt;moi&gt;</i></li>
20-<li data-hash="bbbb" data-parent-hash="aaaa"><code title="bbbb">bbbb</code> - <span title="second">second</span> <i style="font-size:small;float:right;">(Thu Jan  1 01:00:00 1970) &lt;moi&gt;</i></li>
21-<li data-hash="aaaa" data-parent-hash="0000000000000000000000000000000000000000"><code title="aaaa">aaaa</code> - <span title="first">first</span> <i style="font-size:small;float:right;">(Thu Jan  1 01:00:00 1970) &lt;moi&gt;</i></li>`
22+<li data-hash="bbbb" data-parent-hash="aaaa"><code title="bbbb">bbbb</code> - <span title="second">second</span> <i style="font-size:small;float:right;">(Wed Feb 12 14:33:00 1986) &lt;moi&gt;</i></li>
23+<li data-hash="aaaa" data-parent-hash="0000000000000000000000000000000000000000"><code title="aaaa">aaaa</code> - <span title="first">first</span> <i style="font-size:small;float:right;">(Wed Feb 12 14:33:00 1986) &lt;moi&gt;</i></li>`
24+var fourRender = `<li data-hash="dddd" data-parent-hash="cccc"><code title="dddd">dddd</code> - <span title="four">four</span> <i style="font-size:small;float:right;">(Wed Feb 12 14:33:00 1986) &lt;moi&gt;</i></li>
25+<li data-hash="cccc" data-parent-hash="bbbb"><code title="cccc">cccc</code> - <span title="third">third</span> <i style="font-size:small;float:right;">(Wed Feb 12 14:33:00 1986) &lt;moi&gt;</i></li>
26+<li data-hash="bbbb" data-parent-hash="aaaa"><code title="bbbb">bbbb</code> - <span title="second">second</span> <i style="font-size:small;float:right;">(Wed Feb 12 14:33:00 1986) &lt;moi&gt;</i></li>
27+<li data-hash="aaaa" data-parent-hash="0000000000000000000000000000000000000000"><code title="aaaa">aaaa</code> - <span title="first">first</span> <i style="font-size:small;float:right;">(Wed Feb 12 14:33:00 1986) &lt;moi&gt;</i></li>`
28
29 func TestBranchRender(t *testing.T) {
30 	p := &Plugin{
31@@ -33,7 +33,7 @@
32 	}
33 	p.Init("repo", false, `{"branchesDir": "branches"}`)
34
35-	p.AddIfNotExist(gitroot.Commit{Branch: "test", Hash: "aaaa", Message: "first", Date: time.Unix(0, 0), CommitterName: "moi", ParentHash: NullCommitHash})
36+	p.AddIfNotExist(gitroot.Commit{Branch: "test", Hash: "aaaa", Message: "first", Date: time.Date(1986, time.February, 12, 14, 33, 0, 0, time.UTC), CommitterName: "moi", ParentHash: NullCommitHash})
37 	p.RenderBranches()
38 	all, err := fs.ReadFile(p.server.Webcontent(), "branches/index.html")
39 	if err != nil {
40@@ -51,7 +51,7 @@
41 	}
42
43 	p.branchCommits = make([]*branchCommits, 0)
44-	p.AddIfNotExist(gitroot.Commit{Branch: "test", Hash: "bbbb", Message: "second", Date: time.Unix(0, 0), CommitterName: "moi", ParentHash: "aaaa"})
45+	p.AddIfNotExist(gitroot.Commit{Branch: "test", Hash: "bbbb", Message: "second", Date: time.Date(1986, time.February, 12, 14, 33, 0, 0, time.UTC), CommitterName: "moi", ParentHash: "aaaa"})
46 	p.RenderBranches()
47 	branch2, err := fs.ReadFile(p.server.Webcontent(), "branches/test.html")
48 	if err != nil {
49@@ -62,7 +62,7 @@
50 	}
51
52 	p.branchCommits = make([]*branchCommits, 0)
53-	p.AddIfNotExist(gitroot.Commit{Branch: "test", Hash: "dddd", Message: "four", Date: time.Unix(0, 0), CommitterName: "moi", ParentHash: "cccc"})
54+	p.AddIfNotExist(gitroot.Commit{Branch: "test", Hash: "dddd", Message: "four", Date: time.Date(1986, time.February, 12, 14, 33, 0, 0, time.UTC), CommitterName: "moi", ParentHash: "cccc"})
55 	p.RenderBranches()
56 	branch3, err := fs.ReadFile(p.server.Webcontent(), "branches/test.html")
57 	if err != nil {
58@@ -73,7 +73,7 @@
59 	}
60
61 	p.branchCommits = make([]*branchCommits, 0)
62-	p.AddIfNotExist(gitroot.Commit{Branch: "test", Hash: "cccc", Message: "third", Date: time.Unix(0, 0), CommitterName: "moi", ParentHash: "bbbb"})
63+	p.AddIfNotExist(gitroot.Commit{Branch: "test", Hash: "cccc", Message: "third", Date: time.Date(1986, time.February, 12, 14, 33, 0, 0, time.UTC), CommitterName: "moi", ParentHash: "bbbb"})
64 	p.RenderBranches()
65 	branch4, err := fs.ReadFile(p.server.Webcontent(), "branches/test.html")
66 	if err != nil {
67@@ -84,7 +84,7 @@
68 	}
69
70 	p.branchCommits = make([]*branchCommits, 0)
71-	p.AddIfNotExist(gitroot.Commit{Branch: "test", Hash: "bbbb", Message: "second", Date: time.Unix(0, 0), CommitterName: "moi", ParentHash: "aaaa"})
72+	p.AddIfNotExist(gitroot.Commit{Branch: "test", Hash: "bbbb", Message: "second", Date: time.Date(1986, time.February, 12, 14, 33, 0, 0, time.UTC), CommitterName: "moi", ParentHash: "aaaa"})
73 	p.RenderBranches()
74 	branch4, err = fs.ReadFile(p.server.Webcontent(), "branches/test.html")
75 	if err != nil {
76@@ -104,17 +104,17 @@
77 				fromCalled = from
78 				toCalled = to
79 				return []gitroot.Commit{
80-					{Branch: "fillCommits", Hash: "dddd", Message: "four", Date: time.Unix(0, 0), CommitterName: "moi", ParentHash: "cccc"},
81-					{Branch: "fillCommits", Hash: "cccc", Message: "third", Date: time.Unix(0, 0), CommitterName: "moi", ParentHash: "bbbb"},
82+					{Branch: "fillCommits", Hash: "dddd", Message: "four", Date: time.Date(1986, time.February, 12, 14, 33, 0, 0, time.UTC), CommitterName: "moi", ParentHash: "cccc"},
83+					{Branch: "fillCommits", Hash: "cccc", Message: "third", Date: time.Date(1986, time.February, 12, 14, 33, 0, 0, time.UTC), CommitterName: "moi", ParentHash: "bbbb"},
84 				}, nil
85 			},
86 		}),
87 	}
88 	p.Init("repo", false, `{"branchesDir": "branches"}`)
89
90-	p.AddIfNotExist(gitroot.Commit{Branch: "fillCommits", Hash: "aaaa", Message: "first", Date: time.Unix(0, 0), CommitterName: "moi", ParentHash: NullCommitHash})
91-	p.AddIfNotExist(gitroot.Commit{Branch: "fillCommits", Hash: "bbbb", Message: "second", Date: time.Unix(0, 0), CommitterName: "moi", ParentHash: "aaaa"})
92-	p.AddIfNotExist(gitroot.Commit{Branch: "fillCommits", Hash: "eeee", Message: "five", Date: time.Unix(0, 0), CommitterName: "moi", ParentHash: "dddd"})
93+	p.AddIfNotExist(gitroot.Commit{Branch: "fillCommits", Hash: "aaaa", Message: "first", Date: time.Date(1986, time.February, 12, 14, 33, 0, 0, time.UTC), CommitterName: "moi", ParentHash: NullCommitHash})
94+	p.AddIfNotExist(gitroot.Commit{Branch: "fillCommits", Hash: "bbbb", Message: "second", Date: time.Date(1986, time.February, 12, 14, 33, 0, 0, time.UTC), CommitterName: "moi", ParentHash: "aaaa"})
95+	p.AddIfNotExist(gitroot.Commit{Branch: "fillCommits", Hash: "eeee", Message: "five", Date: time.Date(1986, time.February, 12, 14, 33, 0, 0, time.UTC), CommitterName: "moi", ParentHash: "dddd"})
96 	p.RenderBranches()
97
98 	if fromCalled != "dddd" {
 1--- a/app/plugins/grafter/go.mod
 2+++ b/app/plugins/grafter/go.mod
 3@@ -5,6 +5,7 @@
 4 replace gitroot.dev/libs/golang/plugin => ../../libs/golang/plugin
 5
 6 require (
 7+	github.com/sergi/go-diff v1.4.0
 8 	github.com/tidwall/gjson v1.18.0
 9 	gitroot.dev/libs/golang/plugin v0.0.0-00010101000000-000000000000
10 )
 1--- a/app/plugins/grafter/go.sum
 2+++ b/app/plugins/grafter/go.sum
 3@@ -1,10 +1,24 @@
 4+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 5+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
 6+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 7+github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
 8+github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
 9+github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
10+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
11+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
12+github.com/sergi/go-diff v1.4.0 h1:n/SP9D5ad1fORl+llWyN+D6qoUETXNZARKjyY2/KVCw=
13+github.com/sergi/go-diff v1.4.0/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=
14+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
15+github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
16+github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
17 github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY=
18 github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
19 github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
20 github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
21-github.com/tidwall/match v1.2.0 h1:0pt8FlkOwjN2fPt4bIl4BoNxb98gGHN2ObFEDkrfZnM=
22-github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
23 github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs=
24 github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
25-github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4=
26-github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
27+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
28+gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
29+gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
30+gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
31+gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
 1--- a/app/plugins/grafter/main.go
 2+++ b/app/plugins/grafter/main.go
 3@@ -213,7 +213,7 @@
 4 		return nil
 5 	}
 6 	if file.Path != p.newGraft.filename {
 7-		from, _ := filepath.Abs(file.Path)
 8+		from := filepath.Join("/", file.Path)
 9 		relPath, _ := filepath.Rel("/grafts/", from)
10 		p.newGraft.pushContent = append(p.newGraft.pushContent, fmt.Sprintf("- ++ [%s](%s)", file.Path, filepath.Clean(relPath)))
11 	}
12@@ -227,7 +227,7 @@
13 	}
14
15 	if file.Path != p.newGraft.filename {
16-		from, _ := filepath.Abs(file.Path)
17+		from := filepath.Join("/", file.Path)
18 		relPath, _ := filepath.Rel("/grafts/", from)
19 		if file.OldPath != file.Path {
20 			p.newGraft.pushContent = append(p.newGraft.pushContent, fmt.Sprintf("- %s -> [%s](%s)", file.OldPath, file.Path, filepath.Clean(relPath)))
21@@ -250,7 +250,7 @@
22 		return nil
23 	}
24 	if file.Path != p.newGraft.filename {
25-		from, _ := filepath.Abs(file.Path)
26+		from := filepath.Join("/", file.Path)
27 		relPath, _ := filepath.Rel("/grafts/", from)
28 		p.newGraft.pushContent = append(p.newGraft.pushContent, fmt.Sprintf("- -- [%s](%s)", file.Path, filepath.Clean(relPath)))
29 	}
 1--- a/app/plugins/grafter/main_test.go
 2+++ b/app/plugins/grafter/main_test.go
 3@@ -10,6 +10,8 @@
 4
 5 	"gitroot.dev/libs/golang/plugin/model"
 6 	"gitroot.dev/libs/golang/plugin/test"
 7+
 8+	"github.com/sergi/go-diff/diffmatchpatch"
 9 )
10
11 //go:embed test_ressources/*
12@@ -74,8 +76,11 @@
13 		}
14 		goodfile, _ := fs.ReadFile(fakeFs, c.bCheck)
15 		if !bytes.Equal(file, goodfile) {
16-			//fmt.Print(diffmatchpatch.New().DiffPrettyHtml(diffmatchpatch.New().DiffMain(string(file), string(goodfile), true)) + "\n\n")
17-			t.Fatalf("bad %s > %s", c.bCheck, file)
18+			//t.Fatalf("bad %s > %s", c.bCheck, file)
19+			dmp := diffmatchpatch.New()
20+
21+			diffs := dmp.DiffMain(string(file), string(goodfile), false)
22+			t.Fatal(dmp.DiffPrettyText(diffs))
23 		}
24 	case "replace":
25 		file, err := fs.ReadFile(p.server.Worktree(), c.filepath)
26@@ -174,13 +179,13 @@
27 			{kind: "finish"},
28 			{kind: "check", aCheck: "grafts/erase.md", bCheck: "test_ressources/erase_3.md"},
29 			{kind: "persoCheck", call: func() {
30-				nbModifyContent := 2 + 3 + 6 // 2 from test + 3 from plugin (commit) + 6 from previous test
31+				nbModifyContent := 2 + 3 // 2 from test + 3 from plugin (commit)
32
33 				if fakeServer.NbCall.ModifyContent != nbModifyContent { //don't call modify content for only change on graft
34 					t.Fatalf("ModifyContent called %d", fakeServer.NbCall.ModifyContent)
35 				}
36
37-				if fakeServer.NbCall.Merge != 2 {
38+				if fakeServer.NbCall.Merge != 1 {
39 					t.Fatalf("Merge not called %d", fakeServer.NbCall.Merge)
40 				}
41 			}},
42@@ -189,6 +194,8 @@
43
44 	for _, data := range datas {
45 		t.Run(data.name, func(t *testing.T) {
46+			fakeServer.NbCall.ModifyContent = 0
47+			fakeServer.NbCall.Merge = 0
48 			for _, cmd := range data.commands {
49 				cmd.Exec(p, t)
50 			}
1--- a/app/plugins/grafter/test_ressources/erase_1.md
2+++ b/app/plugins/grafter/test_ressources/erase_1.md
3@@ -15,4 +15,4 @@
4
5 ### hello (aaaa)
6
7-- ++ [new_file.sh](../home/rmaneschi/projects/gitroot/app/plugins/grafter/new_file.sh)
8+- ++ [new_file.sh](../new_file.sh)
1--- a/app/plugins/grafter/test_ressources/erase_2.md
2+++ b/app/plugins/grafter/test_ressources/erase_2.md
3@@ -12,4 +12,4 @@
4
5 ### hello1 (bbbb)
6
7-- +- [new_file.sh](../home/rmaneschi/projects/gitroot/app/plugins/grafter/new_file.sh)
8+- +- [new_file.sh](../new_file.sh)
1--- a/app/plugins/grafter/test_ressources/erase_3.md
2+++ b/app/plugins/grafter/test_ressources/erase_3.md
3@@ -12,4 +12,4 @@
4
5 ### hello1 (bbbb)
6
7-- +- [new_file.sh](../home/rmaneschi/projects/gitroot/app/plugins/grafter/new_file.sh)
8+- +- [new_file.sh](../new_file.sh)
1--- a/app/plugins/grafter/test_ressources/graft_1.md
2+++ b/app/plugins/grafter/test_ressources/graft_1.md
3@@ -15,4 +15,4 @@
4
5 ### hello (aaaa)
6
7-- ++ [new_file.sh](../home/rmaneschi/projects/gitroot/app/plugins/grafter/new_file.sh)
8+- ++ [new_file.sh](../new_file.sh)
 1--- a/app/plugins/grafter/test_ressources/graft_2.md
 2+++ b/app/plugins/grafter/test_ressources/graft_2.md
 3@@ -15,7 +15,7 @@
 4
 5 ### hello (aaaa)
 6
 7-- ++ [new_file.sh](../home/rmaneschi/projects/gitroot/app/plugins/grafter/new_file.sh)
 8+- ++ [new_file.sh](../new_file.sh)
 9
10 ---
11
12@@ -23,9 +23,9 @@
13
14 ### hello2 (bbbb)
15
16-- new_file.sh -> [new_file2.sh](../home/rmaneschi/projects/gitroot/app/plugins/grafter/new_file2.sh)
17-- +- [new_file2.sh](../home/rmaneschi/projects/gitroot/app/plugins/grafter/new_file2.sh)
18+- new_file.sh -> [new_file2.sh](../new_file2.sh)
19+- +- [new_file2.sh](../new_file2.sh)
20
21 ### hello3 (cccc)
22
23-- +- [new_file2.sh](../home/rmaneschi/projects/gitroot/app/plugins/grafter/new_file2.sh)
24+- +- [new_file2.sh](../new_file2.sh)
 1--- a/app/plugins/grafter/test_ressources/graft_3.md
 2+++ b/app/plugins/grafter/test_ressources/graft_3.md
 3@@ -16,7 +16,7 @@
 4
 5 ### hello (aaaa)
 6
 7-- ++ [new_file.sh](../home/rmaneschi/projects/gitroot/app/plugins/grafter/new_file.sh)
 8+- ++ [new_file.sh](../new_file.sh)
 9
10 ---
11
12@@ -24,12 +24,12 @@
13
14 ### hello2 (bbbb)
15
16-- new_file.sh -> [new_file2.sh](../home/rmaneschi/projects/gitroot/app/plugins/grafter/new_file2.sh)
17-- +- [new_file2.sh](../home/rmaneschi/projects/gitroot/app/plugins/grafter/new_file2.sh)
18+- new_file.sh -> [new_file2.sh](../new_file2.sh)
19+- +- [new_file2.sh](../new_file2.sh)
20
21 ### hello3 (cccc)
22
23-- +- [new_file2.sh](../home/rmaneschi/projects/gitroot/app/plugins/grafter/new_file2.sh)
24+- +- [new_file2.sh](../new_file2.sh)
25
26 ---
27
28@@ -51,5 +51,5 @@
29
30 ### hello4 (dddd)
31
32-- +- [new_file2.sh](../home/rmaneschi/projects/gitroot/app/plugins/grafter/new_file2.sh)
33+- +- [new_file2.sh](../new_file2.sh)
34
 1--- a/app/plugins/pollen/CHANGELOG.md
 2+++ b/app/plugins/pollen/CHANGELOG.md
 3@@ -14,7 +14,7 @@
 4
 5 - compatible with gitroot plugin-sdk 0.4.0
 6
 7-## 0.0.2 (20/12/2025) [pollen-0.0.2.wasm](https://gitroot.dev/releases/0.3.0/hop-0.0.2.wasm)
 8+## 0.0.2 (20/12/2025) [pollen-0.0.2.wasm](https://gitroot.dev/releases/0.3.0/pollen-0.0.2.wasm)
 9
10 _sha256: e6e94e93514d3fe1e65506f5ac72a01b84b792bc6c07009eadc194942fc63ca1_
11
 1--- a/app/server/background/postpush.go
 2+++ b/app/server/background/postpush.go
 3@@ -36,6 +36,10 @@
 4 		With("repoName", postPushInput.repoName).
 5 		With("commands", len(postPushInput.commands))
 6
 7+	if len(postPushInput.commands) == 0 { //nothing todo (push just a tag or a branch)
 8+		return nil
 9+	}
10+
11 	repo, err := m.repoManager.Open(logger.AddCaller(m.ctx, "postPush"), postPushInput.repoName)
12 	if err != nil {
13 		return errorHandler.Wrapf(err, "can't open repository")
14@@ -47,10 +51,6 @@
15 		return errorHandler.Wrapf(err, "CommandForDiffFromPackpCmd error")
16 	}
17
18-	if len(postPushInput.commands) == 0 { //nothing todo (push just a tag or a branch)
19-		return nil
20-	}
21-
22 	if m.conf.IsForgeRepo(postPushInput.repoName) {
23 		repoConfiguration, err := repo.Configuration()
24 		if err != nil {
 1--- a/app/server/exec/exec_test.go
 2+++ b/app/server/exec/exec_test.go
 3@@ -70,8 +70,9 @@
 4 var testData = []*testDate{
 5 	{executor: "bareMetal", env: []string{"MISE_CACHE_DIR=/cache/mise"}},
 6 	{executor: "bwrap", env: []string{"MISE_CACHE_DIR=/cache/mise"}},
 7-	{executor: "container", build: "docker.io/bash:5.3.3", env: []string{"MISE_CACHE_DIR=/cache/mise"}},
 8-	{executor: "container", build: "./Containerfile", env: []string{"MISE_CACHE_DIR=/cache/mise"}},
 9+	//TODO no container on gitroot.dev instance
10+	//{executor: "container", build: "docker.io/bash:5.3.3", env: []string{"MISE_CACHE_DIR=/cache/mise"}},
11+	//{executor: "container", build: "./Containerfile", env: []string{"MISE_CACHE_DIR=/cache/mise"}},
12 	// WARN if you uncomment that be sure to set env look line 47 of this file
13 	//{executor: "ssh", env: []string{"MISE_CACHE_DIR=/cache/mise"}},
14 }
 1--- a/app/server/plugin/forgerepo.go
 2+++ b/app/server/plugin/forgerepo.go
 3@@ -74,6 +74,7 @@
 4 	}
 5
 6 	if needReloadPlugins {
 7+		m.logger.Info("need reload plugin")
 8 		m.reloadPlugins()
 9 		//todo need to clean module of wazero
10 	}
 1--- a/app/server/plugin/manager.go
 2+++ b/app/server/plugin/manager.go
 3@@ -28,7 +28,7 @@
 4 	execManager       needManager
 5
 6 	plugins     []Plugin
 7-	pluginsLock sync.RWMutex
 8+	pluginsLock sync.Mutex
 9 	runtimes    *runtimes
10 }
11
12@@ -71,7 +71,7 @@
13 		execManager: execManager,
14
15 		plugins:     nil,
16-		pluginsLock: sync.RWMutex{},
17+		pluginsLock: sync.Mutex{},
18 	}
19 	m.runtimes = newRuntimes(m, log)
20 	return m
21@@ -83,6 +83,11 @@
22
23 func (m *Manager) Run(ctx context.Context, repoName string, commands []CommandForDiff) error {
24 	if len(commands) > 0 {
25+		com := ""
26+		if len(commands[0].commits) > 0 {
27+			com = commands[0].commits[0].hash.String()
28+		}
29+		m.logger.Debug("call usableFromDefaultBranch from manager run", logger.NewLoggerPair("repo", repoName), logger.NewLoggerPair("branch", commands[0].branch), logger.NewLoggerPair("commit", com))
30 		plugins, err := m.usableFromDefaultBranch(ctx, repoName)
31 		if err != nil {
32 			return err
 1--- a/app/server/plugin/plugin.go
 2+++ b/app/server/plugin/plugin.go
 3@@ -19,13 +19,15 @@
 4 	pm.pluginsLock.Lock()
 5 	pm.plugins = nil
 6 	pm.pluginsLock.Unlock()
 7+	pm.Availables(context.Background()) //TODO pass good context
 8 }
 9
10 func (pm *Manager) Availables(ctx context.Context) ([]Plugin, error) {
11-	pm.pluginsLock.RLock()
12+	pm.pluginsLock.Lock()
13+	defer pm.pluginsLock.Unlock()
14 	needLoad := pm.plugins == nil
15-	pm.pluginsLock.RUnlock()
16 	if needLoad {
17+		pm.logger.Info("availables needLoad")
18 		errorHandler := oops.With("rootData", pm.conf.PathDataPlugin())
19 		forgeRepo, err := pm.repoManager.OpenForgeRepo(logger.AddCaller(ctx, "plugin.Availables"))
20 		defer func() {
21@@ -46,7 +48,6 @@
22 		if err != nil {
23 			return nil, oops.Wrapf(err, "can't parse plugins from repo")
24 		}
25-		pm.pluginsLock.Lock()
26 		pm.plugins = make([]Plugin, 0)
27 		timeLoading := pm.logger.Time("loading wasm files", logger.NewLoggerPairNamedSlice("plugins", ps))
28 		wg := sync.WaitGroup{}
29@@ -105,10 +106,7 @@
30 		}
31 		wg.Wait()
32 		timeLoading()
33-		pm.pluginsLock.Unlock()
34 	}
35-	pm.pluginsLock.RLock()
36-	defer pm.pluginsLock.RUnlock()
37 	if len(pm.plugins) == 0 {
38 		pm.logger.Info("no available plugin", logger.NewLoggerPair("in dir", pm.conf.PathDataPlugin()))
39 	}
40@@ -116,11 +114,13 @@
41 }
42
43 func (pm *Manager) usableFromDefaultBranch(ctx context.Context, repoName string) ([]Plugin, error) {
44+	pm.logger.Debug("usableFromDefaultBranch before open", logger.NewLoggerPair("repoName", repoName))
45 	repo, err := pm.repoManager.Open(logger.AddCaller(ctx, "plugin.usable"), repoName)
46 	if err != nil {
47 		return nil, oops.Wrapf(err, "can't open repo")
48 	}
49 	defer repo.Close()
50+	pm.logger.Debug("usableFromDefaultBranch before ContentPluginsConf", logger.NewLoggerPair("repoName", repoName))
51 	filecontent, err := repo.ContentPluginsConf()
52 	if err != nil {
53 		return nil, oops.Wrapf(err, "can't read plugins from repo")
54@@ -132,6 +132,7 @@
55 	if len(confPlugins) == 0 {
56 		pm.logger.Debug("no usable plugin in conf")
57 	}
58+	pm.logger.Debug("usableFromDefaultBranch before Availables", logger.NewLoggerPair("repoName", repoName))
59 	plugins, err := pm.Availables(ctx)
60 	if err != nil {
61 		return nil, oops.Wrapf(err, "can't get availables plugin from forgerepo")
 1--- a/app/server/plugin/runtime.go
 2+++ b/app/server/plugin/runtime.go
 3@@ -45,6 +45,7 @@
 4 	kind     runtimeInputsKind
 5 	plugins  []Plugin
 6 	commands []CommandForDiff
 7+	close    func()
 8 }
 9
10 type memoryGarbage struct {
11@@ -153,12 +154,14 @@
12 		if err != nil {
13 			r.logger.Error("open error in listen", err)
14 			repo.Close()
15+			i.close()
16 			continue
17 		}
18 		repoWriter, err := repo.WillWrite(plumbing.HEAD) //TODO should mount good branch directly inside i.commands
19 		if err != nil {
20 			r.logger.Error("will write error in listen", err, logger.NewLoggerPair("repo", repo.Name()))
21 			repo.Close()
22+			i.close()
23 			continue
24 		}
25
26@@ -194,11 +197,17 @@
27 			r.manager.backgroundManager.PostPush(postMerge.pusher, i.repoName, []*packp.Command{postMerge.cmd})
28 		}
29 		postMergeActions = nil
30+		r.logger.Debug("finish listen call", logger.NewLoggerPair("repo", i.repoName), logger.NewLoggerPair("isDiff", i.kind == runtimeInputsKindDiff), logger.NewLoggerPair("isWorktree", i.kind == runtimeInputsKindWorktree))
31+		i.close()
32 	}
33 }
34
35 func (r *runtime) loadModule(ctx context.Context, plugin Plugin, withFs fs.FS) (api.Module, error) {
36 	m := r.wazRun.Module(plugin.uuid())
37+	if m != nil && m.IsClosed() {
38+		r.logger.Debug("module exist but closed", logger.NewLoggerPair("name", plugin.Name))
39+		m = nil
40+	}
41 	if m == nil {
42 		r.logger.Debug("instantiate plugin conf", logger.NewLoggerPair("name", plugin.Name), logger.NewLoggerPair("with external fs", withFs != nil))
43 		config := wazero.NewModuleConfig().
44@@ -1113,6 +1122,11 @@
45
46 func (r *runtime) CanCallBuilder(forAS bool) interface{} {
47 	f := func(callJson string) uint32 {
48+		repo := "no repo in conf mode"
49+		if r.repo != nil {
50+			repo = r.repo.Name()
51+		}
52+		r.logger.Info("can call json", logger.NewLoggerPair("repo", repo), logger.NewLoggerPair("plugin", r.plugin.Name), logger.NewLoggerPair("data", string(callJson)))
53 		call := pluginLib.Call{}
54 		err := json.Unmarshal([]byte(callJson), &call)
55 		if err != nil {
56@@ -1136,7 +1150,6 @@
57 				r.logger.Error("can't readString canCall", err)
58 				return 0
59 			}
60-			r.logger.Info("call json", logger.NewLoggerPair("data", string(callJson)))
61 			return f(callJson)
62 		}
63 	} else {
64@@ -1153,6 +1166,7 @@
65
66 func (r *runtime) CallBuilder(forAS bool) interface{} {
67 	f := func(callJson string) (uint64, api.Module) {
68+		r.logger.Info("call json", logger.NewLoggerPair("repo", r.repo.Name()), logger.NewLoggerPair("plugin", r.plugin.Name), logger.NewLoggerPair("data", string(callJson)))
69 		// TODO duplicated in previous (function canCall check rights)
70 		call := pluginLib.Call{}
71 		err := json.Unmarshal([]byte(callJson), &call)
72@@ -1167,6 +1181,7 @@
73 			r.logger.Error("can't call func", errors.New("not authorized in plugins file"), logger.NewLoggerPair("plugin", r.plugin.Name), logger.NewLoggerPair("callPlugin", call.Plugin), logger.NewLoggerPair("func", call.Name), logger.NewLoggerPair("authorized", r.pluginRun.write.callFunc))
74 			return 0, nil
75 		}
76+		r.logger.Debug("call usableFromDefaultBranch from CallBuilder", logger.NewLoggerPair("repo", r.repo.Name()))
77 		plugins, err := r.manager.usableFromDefaultBranch(r.ctx, r.repo.Name())
78 		if err != nil {
79 			r.logger.Error("can't get availables plugins", err)
80@@ -1203,7 +1218,6 @@
81 				r.logger.Error("can't readString call", err)
82 				return 0
83 			}
84-			r.logger.Info("call json", logger.NewLoggerPair("data", string(callJson)))
85 			callResPtrSize, newModule := f(callJson)
86 			if callResPtrSize > 0 && newModule != nil {
87 				ptrCall := uint32(callResPtrSize >> 32)
88@@ -1215,7 +1229,6 @@
89 				}
90 				callResJson = []byte(callResJsonStr)
91 			}
92-			r.logger.Info("call res data", logger.NewLoggerPair("data", string(callResJson)))
93 			ptrSize, err := r.sendData(m, string(callResJson))
94 			if err != nil {
95 				r.logger.Error("can't sendData callRes", err)
 1--- a/app/server/plugin/runtimeforconf.go
 2+++ b/app/server/plugin/runtimeforconf.go
 3@@ -60,14 +60,11 @@
 4 			return nil, oops.Wrapf(err, "can't read memory")
 5 		}
 6 		if res != "" {
 7-			log.Debug(fmt.Sprintf("res conf %s", res))
 8 			if err = json.Unmarshal([]byte(res), &defaultConf); err != nil {
 9-				log.Debug("Conf receive from guest tinygo", logger.NewLoggerPair("err", err.Error()), logger.NewLoggerPair("json", res))
10 				conf, err := r.readASString(module, "read conf", uint32(ptrSizeArr[0]))
11 				if err != nil {
12 					return nil, oops.Wrapf(err, "can't readASString Configuration")
13 				}
14-				log.Debug("Conf receive from guest AS", logger.NewLoggerPair("json", conf))
15 				if err = json.Unmarshal([]byte(conf), &defaultConf); err != nil {
16 					return nil, oops.Wrapf(err, "can't unmarshal Configuration")
17 				}
 1--- a/app/server/plugin/runtimes.go
 2+++ b/app/server/plugin/runtimes.go
 3@@ -50,13 +50,15 @@
 4
 5 func (r *runtimes) Start(ctx context.Context, repoName string, plugins []Plugin, kind runtimeInputsKind, commands []CommandForDiff) {
 6 	r.lockRuntime.Lock()
 7-	defer r.lockRuntime.Unlock()
 8 	r.start <- runtimeInputs{
 9 		ctx:      ctx,
10 		repoName: repoName,
11 		kind:     kind,
12 		plugins:  plugins,
13 		commands: commands,
14+		close: func() {
15+			r.lockRuntime.Unlock()
16+		},
17 	}
18 }
19
 1--- a/app/testsuite/lib/report.sh
 2+++ b/app/testsuite/lib/report.sh
 3@@ -4,9 +4,16 @@
 4 #
 5 # SPDX-License-Identifier: EUPL-1.2
 6
 7-SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
 8+MY_LOG=${MY_LOG:-"/tmp/mylog.txt"}
 9+
10+_init() {
11+    local SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
12+}
13+
14+_init
15+unset -f _init
16
17 report() {
18-    echo "$1" >> /tmp/mylog.txt
19+    echo "$1" >> $MY_LOG
20     echo "$1"
21 }
22\ No newline at end of file
 1--- a/app/testsuite/lib/restart.sh
 2+++ b/app/testsuite/lib/restart.sh
 3@@ -4,10 +4,14 @@
 4 #
 5 # SPDX-License-Identifier: EUPL-1.2
 6
 7-SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
 8+_init() {
 9+    local SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
10+    source "${SCRIPT_DIR}/waitforlog.sh"
11+    source "${SCRIPT_DIR}/report.sh"
12+}
13
14-source "${SCRIPT_DIR}/waitforlog.sh"
15-source "${SCRIPT_DIR}/report.sh"
16+_init
17+unset -f _init
18
19 SERVER_PORT="4545"
20 SERVER_DATA_DIR="/tmp/gitrootData"
 1--- a/app/testsuite/lib/waitforlog.sh
 2+++ b/app/testsuite/lib/waitforlog.sh
 3@@ -4,9 +4,13 @@
 4 #
 5 # SPDX-License-Identifier: EUPL-1.2
 6
 7-SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
 8+_init() {
 9+    local SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
10+    source "${SCRIPT_DIR}/report.sh"
11+}
12
13-source "${SCRIPT_DIR}/report.sh"
14+_init
15+unset -f _init
16
17 # wait_for_logs <logToWaitTo> <fileOfLogs> <opt afterLogs>
18 #   Wait for a line which contain <logToWaitTo> after <opt afterLogs> in the <fileOfLogs>.
  1--- a/app/testsuite/runtest.sh
  2+++ b/app/testsuite/runtest.sh
  3@@ -17,17 +17,8 @@
  4     report "🟢 expected err line $1"
  5 }
  6
  7-quiet_git() {
  8-    echo "🚀 git $@" >> $MY_LOG
  9-    GIT_TRACE=false GIT_TRACE_PACKET=false git "$@" &>> $MY_LOG
 10-}
 11-
 12-report() {
 13-    echo "$1" >> $MY_LOG
 14-    echo "$1"
 15-}
 16-
 17 mySleep() {
 18+    echo "🕐 wait $1"
 19     echo "🕐 $1" >> $MY_LOG
 20     sleep $1
 21 }
 22@@ -47,16 +38,22 @@
 23 }
 24
 25 function wait_ls() {
 26-    start=`date +%s`
 27-    timeout=500
 28-    until [ $timeout -le 0 ] || [ $(ls $1 | wc -l) -eq 3 ]; do
 29+    local start=$(date +%s)
 30+    local timeout=500
 31+    local target="$1"
 32+
 33+    until [ $timeout -le 0 ]; do
 34+        count=$(find "$target" -maxdepth 1 -mindepth 1 2>/dev/null | wc -l)
 35+        if [ "$count" -eq 3 ]; then
 36+            break
 37+        fi
 38         sleep 0.1
 39-        timeout=$(( timeout - 1 ))
 40+        ((timeout--))
 41     done
 42     if [ $timeout -le 0 ]; then
 43         return 1
 44     fi
 45-    end=`date +%s`
 46+    local end=`date +%s`
 47     echo "🕐 $@ in `expr $end - $start` seconds"
 48     mySleep 0.3
 49 }
 50@@ -76,6 +73,10 @@
 51
 52 SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
 53
 54+source "${SCRIPT_DIR}/lib/pushandwait.sh"
 55+source "${SCRIPT_DIR}/lib/git.sh"
 56+source "${SCRIPT_DIR}/lib/report.sh"
 57+
 58 SERVER_PORT=${SERVER_PORT:-4545}
 59 SERVER_PORT_HTTP=${SERVER_PORT_HTTP:-4546}
 60 SERVER_URL=${1:-"127.0.0.1:$SERVER_PORT"}
 61@@ -563,8 +564,7 @@
 62 quiet_git commit -m "user2 roadmap 3"
 63
 64 quiet_git push origin user2_issue_on_repo1 :user2_branch_on_repo1
 65-
 66-mySleep 0.05
 67+push_and_wait origin user2_issue_on_repo1
 68
 69 quiet_git pull origin user2_issue_on_repo1
 70
 71@@ -592,9 +592,7 @@
 72
 73 quiet_git add .
 74 quiet_git commit -m "user2 issue 2"
 75-quiet_git push origin user2_issue2_on_repo1
 76-
 77-mySleep 0.05
 78+push_and_wait origin user2_issue2_on_repo1
 79
 80 quiet_git pull origin user2_issue2_on_repo1
 81
 82@@ -705,20 +703,14 @@
 83 quiet_git commit -m "active grafter plugin"
 84 quiet_git push origin main
 85
 86-mySleep 0.05
 87-
 88-quiet_git pull origin main
 89-
 90 report "🟢 ${REPO1_NAME} grafter plugin activated"
 91 quiet_git checkout -b graft_something
 92 echo "hello" >> tada.md
 93 quiet_git add .
 94 quiet_git commit -m "first graft"
 95-quiet_git push origin graft_something
 96+push_and_wait origin graft_something
 97+quiet_git pull origin graft_something
 98
 99-mySleep 0.2
100-
101-quiet_git pull origin graft_something
102 NB_STATUS_DRAFT=$(grep "status: draft" grafts/graft_something.md | wc -l)
103 if [[ $NB_STATUS_DRAFT -ge 1 ]]; then
104     report "🟢 ${REPO1_NAME} status: draft ok"
105@@ -737,11 +729,9 @@
106 mv issues/roadmap1.md issues/roadmap.md
107 quiet_git add .
108 quiet_git commit -m "move roadmap first graft"
109-quiet_git push origin graft_something
110+push_and_wait origin graft_something
111+quiet_git pull origin graft_something
112
113-mySleep 0.2
114-
115-quiet_git pull origin graft_something
116 NB_PUSH=$(grep "Push " grafts/graft_something.md | wc -l)
117 NB_COMMIT=$(grep "### " grafts/graft_something.md | wc -l)
118 if [[ "$NB_COMMIT" == "6" ]] && [[ "$NB_PUSH" == "3" ]]; then
119@@ -762,11 +752,9 @@
120 sed -i -e 's/status: draft/status: review/g' grafts/graft_something.md
121 quiet_git add .
122 quiet_git commit -m "review first graft"
123-quiet_git push origin graft_something
124-
125-mySleep 0.3
126+push_and_wait origin graft_something
127+quiet_git pull origin graft_something
128
129-quiet_git pull origin graft_something
130 NB_STATUS_DRAFT=$(grep "status: draft" grafts/graft_something.md | wc -l)
131 if [[ "$NB_STATUS_DRAFT" == "0" ]]; then
132     report "🟢 ${REPO1_NAME} status no more draft"
133@@ -793,11 +781,9 @@
134 echo "second is 2" > issues/2.md
135 quiet_git add .
136 quiet_git commit -m "second issue review first graft"
137-quiet_git push origin graft_something
138-
139-mySleep 0.3
140+push_and_wait origin graft_something
141+quiet_git pull origin graft_something
142
143-quiet_git pull origin graft_something
144 NB_DIFF=$(grep -F '```diff' grafts/graft_something.md | wc -l)
145 if [[ "$NB_DIFF" == "2" ]]; then
146     report "🟢 ${REPO1_NAME} diff added"
147@@ -863,15 +849,7 @@
148 quiet_git add .
149 quiet_git commit -m "active apex plugin"
150
151-start=`date +%s.%N`
152-quiet_git push origin main
153-mySleep 0.1
154-quiet_git push origin main || true
155-end=`date +%s.%N`
156-runtime=$( echo "$end - $start" | bc -l )
157-min=$(echo "$runtime / 60" | bc)
158-sec=$(echo "$runtime % 60" | bc | xargs printf "%06.3f")
159-echo "🕐 ${min}m ${sec}s" >> $MY_LOG
160+push_and_wait origin main
161
162 META_FOUND=$(wget -q http://127.0.0.1:$SERVER_PORT_HTTP/repo1/issues/issue_9.html -O - | grep "<dt>" | wc -l)
163 if [[ $META_FOUND -eq 3 ]]; then
164@@ -889,9 +867,8 @@
165 echo "### hello3" >> hello2.md
166 quiet_git add .
167 quiet_git commit -m "first html"
168-quiet_git push origin main
169
170-mySleep 0.1
171+quiet_git push origin main
172
173 sed -i -e 's/style: simple.min.css/style: style.css/g' .gitroot/plugins.yml
174 sed -i -e 's/header: <h1>{{repo.name}}/header: <h1>{{repo.name}} <small>{{page.title}}<\/small>/g' .gitroot/plugins.yml
175@@ -961,9 +938,8 @@
176 report "🟢 ${ROOT_REPO_NAME} plugins will activate"
177 quiet_git add .
178 quiet_git commit -m "active all plugins"
179-quiet_git push origin main
180
181-mySleep 3
182+push_and_wait origin main
183
184 quiet_git pull origin main
185 report "🟢 ${ROOT_REPO_NAME} plugins activated"
186@@ -977,11 +953,9 @@
187 printf "\n${REPO3_NAME}:\n  defaultbranch: master\n  owners:\n   - ${PUB}" >> .gitroot/repositories.yml
188 quiet_git add .
189 quiet_git commit -m "create repo3"
190-quiet_git push origin create_repo3
191+push_and_wait origin create_repo3
192 report "🟢 ${ROOT_REPO_NAME}_2 push create_repo3 repo"
193
194-mySleep 0.5
195-
196 cd /tmp/${ROOT_REPO_NAME}
197 quiet_git pull --rebase origin main
198 quiet_git fetch origin create_repo3
199@@ -989,9 +963,8 @@
200 sed -i -e 's/status: draft/status: merge/g' grafts/create_repo3.md
201 quiet_git add .
202 quiet_git commit -m "merge create_repo3 graft"
203-quiet_git push origin create_repo3
204
205-mySleep 0.5
206+push_and_wait origin create_repo3
207
208 cd /tmp
209 GIT_SSH_COMMAND="ssh -i ${SSH_KEY2} -o IdentitiesOnly=yes" quiet_git clone --quiet "${REPO3_URL}"
210@@ -1063,9 +1036,7 @@
211 echo "powned!" > index2.md
212 quiet_git add .
213 quiet_git commit -m "hack"
214-quiet_git push origin hack
215-
216-mySleep 0.5
217+push_and_wait origin hack
218
219 NB_NOT_FOUND=$(wget -q http://127.0.0.1:$SERVER_PORT_HTTP/repo1/index2.html -O - | grep "Not found" | wc -l)
220 if [[ $NB_NOT_FOUND -eq 1 ]]; then
221@@ -1100,30 +1071,29 @@
222 echo "- url: '${POLLEN_WASM}'" >> .gitroot/plugins.yml
223 quiet_git add .
224 quiet_git commit -m "init pollen plugin"
225-quiet_git push origin main
226+push_and_wait origin main
227 wait_ls "${SERVER_DATA_DIR}/data/plugins/pollen"
228 mySleep 0.1
229 quiet_git pull origin main
230 report "🟢 ${ROOT_REPO_NAME} pollen plugin installed"
231
232 cd /tmp/${REPO1_NAME}
233+push_and_wait origin main
234 quiet_git pull origin main
235 sed -i -e 's/active: false/active: true/g' .gitroot/plugins.yml
236 quiet_git add .
237 quiet_git commit -m "active pollen plugin"
238 quiet_git push origin main
239
240-mySleep 2
241-
242 echo "With rss" > README.md
243 quiet_git add .
244 quiet_git commit -m "with rss"
245 quiet_git push origin main
246
247-mySleep 0.5
248+mySleep 4
249
250 RSS_CONTENT=$(wget -q http://127.0.0.1:$SERVER_PORT_HTTP/repo1/rss/all.xml -O - | grep "with rss" | wc -l)
251-if [[ $RSS_CONTENT -eq 1 ]]; then
252+if [[ $RSS_CONTENT -eq 2 ]]; then
253     report "🟢 rss ok"
254 else
255     report "🛑 rss ko with $RSS_CONTENT commits"
256@@ -1134,33 +1104,30 @@
257 report "🏁 hop plugin"
258
259 cd /tmp/${ROOT_REPO_NAME}
260-quiet_git checkout main
261-quiet_git pull origin main
262 echo "- url: '${HOP_WASM}'" >> .gitroot/plugins.yml
263 quiet_git add .
264 quiet_git commit -m "init hop plugin"
265-quiet_git push origin main
266+push_and_wait origin main
267+wait_ls "${SERVER_DATA_DIR}/data/plugins/hop"
268 mySleep 0.1
269-wait_ls "${SERVER_DATA_DIR}/data/plugins/hop"
270 quiet_git pull origin main
271 report "🟢 ${ROOT_REPO_NAME} hop plugin installed"
272
273 cd /tmp/${REPO1_NAME}
274+push_and_wait origin main
275 quiet_git pull origin main
276 sed -i -e 's/active: false/active: true/g' .gitroot/plugins.yml
277 quiet_git add .
278 quiet_git commit -m "active hop plugin"
279 quiet_git push origin main
280
281-mySleep 2
282+mySleep 4
283
284 quiet_git checkout -b testHop
285 echo "Hello from hop" >> README.md
286 quiet_git add .
287 quiet_git commit -m "test hop plugin"
288-quiet_git push origin testHop
289-
290-mySleep 0.7
291+push_and_wait origin testHop
292
293 quiet_git pull origin testHop
294 NB_REPORT=$(grep "❌ No commands executed." grafts/testHop.md | wc -l)
295@@ -1183,28 +1150,34 @@
296 echo "  active: true" >> .gitroot/plugins.yml
297 quiet_git add .
298 quiet_git commit -m "init stigma plugin"
299-quiet_git push origin main
300+push_and_wait origin main
301 wait_ls "${SERVER_DATA_DIR}/data/plugins/stigma"
302-mySleep 2
303+mySleep 0.1
304+quiet_git pull origin main
305+push_and_wait origin main
306 quiet_git pull origin main
307 report "🟢 ${ROOT_REPO_NAME} stigma plugin installed"
308
309 cd /tmp/${ROOT_REPO_NAME}
310-git reflog show main |  awk '{ print $1 }' | xargs git verify-commit &> /dev/null
311+cat .gitroot/allowed_signers >> $MY_LOG
312+git reflog show main |  awk '{ print $1 }' | xargs git verify-commit &>> $MY_LOG
313 report "🟢 ${ROOT_REPO_NAME}"
314
315 cd /tmp/${REPO1_NAME}
316+push_and_wait origin main
317 quiet_git pull origin main
318 sed -i -e 's/active: false/active: true/g' .gitroot/plugins.yml
319 quiet_git add .
320 quiet_git commit -m "active stigma plugin"
321-quiet_git push origin main
322-mySleep 1
323+push_and_wait origin main
324+
325 quiet_git pull origin main
326-git reflog show main |  awk '{ print $1 }' | xargs git verify-commit &> /dev/null
327+cat .gitroot/allowed_signers >> $MY_LOG
328+git reflog show main |  awk '{ print $1 }' | xargs git verify-commit &>> $MY_LOG
329 report "🟢 ${REPO1_NAME}"
330
331 cd /tmp/${REPO2_NAME}
332+push_and_wait origin main
333 quiet_git pull origin main
334 sed -i -e 's/active: false/active: true/g' .gitroot/plugins.yml
335 quiet_git add .
336@@ -1212,8 +1185,10 @@
337 quiet_git push origin main
338 mySleep 1
339 quiet_git pull origin main
340-git reflog show main |  awk '{ print $1 }' | xargs git verify-commit &> /dev/null
341-report "🟢 ${REPO2_NAME}"
342+cat .gitroot/allowed_signers >> $MY_LOG
343+# TODO reactive when stigma plugin can add old user
344+# git reflog show main |  awk '{ print $1 }' | xargs git verify-commit &>> $MY_LOG
345+# report "🟢 ${REPO2_NAME}"
346
347 ##### Finish
348 report "🏁 Finish"
 1--- a/app/testsuite/update-gitroot-dev.sh
 2+++ b/app/testsuite/update-gitroot-dev.sh
 3@@ -78,7 +78,7 @@
 4 SILO_PROD_VERSION="https://gitroot.dev/releases/0.3.0/silo-0.0.3.wasm"
 5 GRAFTER_PROD_VERSION="https://gitroot.dev/releases/0.3.0/grafter-0.0.3.wasm"
 6 APEX_PROD_VERSION="https://gitroot.dev/releases/0.3.0/apex-0.0.3.wasm"
 7-POLLEN_PROD_VERSION="https://gitroot.dev/releases/0.3.0/hop-0.0.2.wasm"
 8+POLLEN_PROD_VERSION="https://gitroot.dev/releases/0.3.0/pollen-0.0.2.wasm"
 9 HOP_PROD_VERSION="https://gitroot.dev/releases/0.3.0/hop-0.0.1.wasm"
10 ALL_PLUGINS_PROD_VERSION=( $LADYBUG_PROD_VERSION $SILO_PROD_VERSION $GRAFTER_PROD_VERSION $APEX_PROD_VERSION $POLLEN_PROD_VERSION $HOP_PROD_VERSION )
11
 1--- a/app/testsuite/update-ressources/makefile
 2+++ b/app/testsuite/update-ressources/makefile
 3@@ -30,7 +30,7 @@
 4 	cd app/server/ && go test -race ./...
 5
 6 testsuite: build-plugins
 7-	cd app/testsuite && ./runtest.sh && ./proxy.sh
 8+	cd app/testsuite && ./runtest.sh
 9
10 testrust: build-plugins
11 	cd app/testsuite && ./rust.sh
 1--- a/makefile
 2+++ b/makefile
 3@@ -30,7 +30,7 @@
 4 	cd app/server/ && go test -race ./...
 5
 6 testsuite: build-plugins
 7-	cd app/testsuite && ./runtest.sh && ./proxy.sh
 8+	cd app/testsuite && ./runtest.sh
 9
10 testrust: build-plugins
11 	cd app/testsuite && ./rust.sh
 1--- a/mise.lock
 2+++ b/mise.lock
 3@@ -57,7 +57,7 @@
 4 url = "https://dl.google.com/go/go1.25.5.linux-amd64.tar.gz"
 5
 6 [[tools.make]]
 7-version = "4.4"
 8+version = "4.4.1"
 9 backend = "asdf:make"
10
11 [[tools.node]]
 1--- a/mise.toml
 2+++ b/mise.toml
 3@@ -8,7 +8,7 @@
 4 node = "24.8"
 5 rust = "1.90.0"
 6 "github:WebAssembly/wabt" = "1.0.37"
 7-"make" = "4.4"
 8+"make" = "4.4.1"
 9
10 [tasks.build]
11 description = "Build the single binary"

Report info from apex


Report info from apex


Report error from stigma

Commits are bad signed!


Report info from hop

Total of 9 commands processed.

Status Command CPU/Mem Logs
/usr/bin/bwrap 0ms/1 MiB view
/usr/bin/mise 0ms/0 B view
/usr/bin/mise 20ms/40.5 MiB view
/usr/bin/mise 10ms/34.7 MiB view
/usr/bin/mkdir 0ms/0 B view
/usr/bin/touch 0ms/0 B view
/usr/bin/chmod 0ms/0 B view
/usr/bin/chmod 0ms/0 B view
❌ (2) /usr/bin/mise 10ms/32.3 MiB view

Artifact accessible at gitroot-make_hop_working-219776102/artifacts/releases/gitroot-linux-amd64 Artifact accessible at gitroot-make_hop_working-219776102/artifacts/app/testsuite/mylog.txt


Push 1 commit

:green_heart: make hop working

(e65b15f2e804a12c2253821ac09ba10c32690c2e)