Fossil SCM
Corrected missing commas in JSON-format diff builder output of Edit records.
Commit
31be3836b74a54117143afb433b5eda6414d0c89b19e091c7826b1216927b94e
Parent
2e2da5783d00665…
1 file changed
+3
+3
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -1143,10 +1143,13 @@ | ||
| 1143 | 1143 | int i, x; |
| 1144 | 1144 | LineChange chng; |
| 1145 | 1145 | blob_append(p->pOut, "5,[", 3); |
| 1146 | 1146 | oneLineChange(pX, pY, &chng); |
| 1147 | 1147 | for(i=x=0; i<chng.n; i++){ |
| 1148 | + if(i>0){ | |
| 1149 | + blob_append_char(p->pOut, ','); | |
| 1150 | + } | |
| 1148 | 1151 | blob_append_json_literal(p->pOut, pX->z + x, chng.a[i].iStart1 - x); |
| 1149 | 1152 | x = chng.a[i].iStart1; |
| 1150 | 1153 | blob_append_char(p->pOut, ','); |
| 1151 | 1154 | blob_append_json_literal(p->pOut, pX->z + x, chng.a[i].iLen1); |
| 1152 | 1155 | x += chng.a[i].iLen1; |
| 1153 | 1156 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -1143,10 +1143,13 @@ | |
| 1143 | int i, x; |
| 1144 | LineChange chng; |
| 1145 | blob_append(p->pOut, "5,[", 3); |
| 1146 | oneLineChange(pX, pY, &chng); |
| 1147 | for(i=x=0; i<chng.n; i++){ |
| 1148 | blob_append_json_literal(p->pOut, pX->z + x, chng.a[i].iStart1 - x); |
| 1149 | x = chng.a[i].iStart1; |
| 1150 | blob_append_char(p->pOut, ','); |
| 1151 | blob_append_json_literal(p->pOut, pX->z + x, chng.a[i].iLen1); |
| 1152 | x += chng.a[i].iLen1; |
| 1153 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -1143,10 +1143,13 @@ | |
| 1143 | int i, x; |
| 1144 | LineChange chng; |
| 1145 | blob_append(p->pOut, "5,[", 3); |
| 1146 | oneLineChange(pX, pY, &chng); |
| 1147 | for(i=x=0; i<chng.n; i++){ |
| 1148 | if(i>0){ |
| 1149 | blob_append_char(p->pOut, ','); |
| 1150 | } |
| 1151 | blob_append_json_literal(p->pOut, pX->z + x, chng.a[i].iStart1 - x); |
| 1152 | x = chng.a[i].iStart1; |
| 1153 | blob_append_char(p->pOut, ','); |
| 1154 | blob_append_json_literal(p->pOut, pX->z + x, chng.a[i].iLen1); |
| 1155 | x += chng.a[i].iLen1; |
| 1156 |