Fossil SCM
/json/timeline/ticket prevUuid is now only explicitly set for non-new files. Previously it was set to NULL, which was a waste-of-time no-op.
Commit
0ddf92042d474d9efc88c764b3366e385116088e
Parent
f94ad194723086c…
1 file changed
+3
-1
+3
-1
| --- src/json_timeline.c | ||
| +++ src/json_timeline.c | ||
| @@ -230,11 +230,13 @@ | ||
| 230 | 230 | rowsV = cson_value_new_array(); |
| 231 | 231 | rows = cson_value_get_array(rowsV); |
| 232 | 232 | } |
| 233 | 233 | cson_object_set(row, "name", json_new_string(db_column_text(&q,2))); |
| 234 | 234 | cson_object_set(row, "uuid", json_new_string(db_column_text(&q,3))); |
| 235 | - cson_object_set(row, "prevUuid", json_new_string(db_column_text(&q,4))); | |
| 235 | + if(!isNew){ | |
| 236 | + cson_object_set(row, "prevUuid", json_new_string(db_column_text(&q,4))); | |
| 237 | + } | |
| 236 | 238 | cson_object_set(row, "state", |
| 237 | 239 | json_new_string(isNew |
| 238 | 240 | ? "added" |
| 239 | 241 | : (isDel |
| 240 | 242 | ? "removed" |
| 241 | 243 |
| --- src/json_timeline.c | |
| +++ src/json_timeline.c | |
| @@ -230,11 +230,13 @@ | |
| 230 | rowsV = cson_value_new_array(); |
| 231 | rows = cson_value_get_array(rowsV); |
| 232 | } |
| 233 | cson_object_set(row, "name", json_new_string(db_column_text(&q,2))); |
| 234 | cson_object_set(row, "uuid", json_new_string(db_column_text(&q,3))); |
| 235 | cson_object_set(row, "prevUuid", json_new_string(db_column_text(&q,4))); |
| 236 | cson_object_set(row, "state", |
| 237 | json_new_string(isNew |
| 238 | ? "added" |
| 239 | : (isDel |
| 240 | ? "removed" |
| 241 |
| --- src/json_timeline.c | |
| +++ src/json_timeline.c | |
| @@ -230,11 +230,13 @@ | |
| 230 | rowsV = cson_value_new_array(); |
| 231 | rows = cson_value_get_array(rowsV); |
| 232 | } |
| 233 | cson_object_set(row, "name", json_new_string(db_column_text(&q,2))); |
| 234 | cson_object_set(row, "uuid", json_new_string(db_column_text(&q,3))); |
| 235 | if(!isNew){ |
| 236 | cson_object_set(row, "prevUuid", json_new_string(db_column_text(&q,4))); |
| 237 | } |
| 238 | cson_object_set(row, "state", |
| 239 | json_new_string(isNew |
| 240 | ? "added" |
| 241 | : (isDel |
| 242 | ? "removed" |
| 243 |