sioutisc (sioutisc) opened
git-bug comment edit command seems to succeed (no error) but has no effect. This is also reflected with in termui whereby comments can be edited but there is no effect on completion of edit.
sioutisc (sioutisc) opened
git-bug comment edit command seems to succeed (no error) but has no effect. This is also reflected with in termui whereby comments can be edited but there is no effect on completion of edit.
Steve Moyer (smoyer64) commented
I'll take a look at this tomorrow since I'm working on tests for the commands package. From the description, it sounds like it might be in core (or maybe we're not replacing the cache contents?).
Sascha (GlancingMind) commented
Sound like the same bug as in issue: #653 A solution is currently still being worked on: #664
Steve Moyer (smoyer64) commented
I've created a draft PR (#855) which thus far only includes tests to help debug this issue. A bit of test instrumentation shows the following:
--- FAIL: TestCommentEdit (0.05s)
/home/smoyer1/git/git-bug/commands/comment_edit_test.go:29: Operation: &{{8483adacda89defe875e59d8b34ae56575ea0cd58127863f78d502d22c4da45c 0xc0000aa810 1 1660925526 [134 222 207 70 204 193 119 53 189 1 99 168 239 163 141 220 249 82 33 16] map[] map[]} this is a bug title this is a bug message []}
/home/smoyer1/git/git-bug/commands/comment_edit_test.go:29: Operation: &{{61c39170f0022b695bdcc680c6dc9a34a127771fe1efdedac677f2a9b8262f9e 0xc0000aa870 3 1660925526 [111 188 226 202 118 147 68 141 182 109 58 155 187 164 95 212 76 56 235 212] map[] map[]} this is a bug comment []}
/home/smoyer1/git/git-bug/commands/comment_edit_test.go:29: Operation: &{{b299a64f8947595b92915c0ea9226d38fe4c204990d78019f3242e8cded1b0d0 0xc0000aa030 6 1660925526 [205 169 251 57 184 129 185 101 218 47 73 234 83 95 122 19 40 66 70 102] map[] map[]} 86418c3ad3acda989de1fe8775e590d8b3f4ae5065750ea0c2d58122786b3f78 this is an altered bug comment []}
/home/smoyer1/git/git-bug/commands/comment_edit_test.go:31: Compiled comments: [{8844883ad3acdaa89dedfe87a5e59cd8b3d4ae5a65758ea0c9d581d2786e3f78 0xc0000aa810 this is a bug message [] 1660925526} {86418c3ad3acda989de1fe8775e590d8b3f4ae5065750ea0c2d58122786b3f78 0xc0000aa870 this is a bug comment [] 1660925526}]
/home/smoyer1/git/git-bug/commands/comment_edit_test.go:35:
Error Trace: comment_test.go:158
comment_edit_test.go:35
Error: Not equal:
expected: "\n\n this is a bug message\n\n\n this is an altered bug comment\n"
actual : "\n\n this is a bug message\n\n\n this is a bug comment\n"
Diff:
--- Expected
+++ Actual
@@ -5,3 +5,3 @@
- this is an altered bug comment
+ this is a bug comment
Test: TestCommentEdit
So it appears that the comment edit operation is being saved to the repository but isn't applied to the compiled snapshot comments. After tonight I'll be off-line until Sunday but can take a look at actually solving the problem then.
Michael Muré (MichaelMure) commented
This should be fixed in master now.
Michael Muré (MichaelMure) closed the bug