Commit d1b0f8d
committed
backend: Make refreshing newly added tasks more robust
The mechanism for obtaining information about newly added task (also
called refreshing) was a bit fragile in situations when the only
reference to the new task object is an ID number.
In particular, if taskwarrior has some GC cleanup pending, and a new
task is added through tasklib, the GC will be performed while exporting
the information about the newly added task, thus changing the IDs and
rendering the ID reference invalid.
This effect is now mitigated in two ways:
1.) We use the new-uuid (available since 2.4.0) verbosity token, which
makes "task add" command output a UUID for the newly added task.
2.) The GC mechanism is disabled during refreshing. This will only be
useful if a manual ID reference was used to get a task by the user.1 parent de17dfc commit d1b0f8d
1 file changed
Lines changed: 13 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
334 | 337 | | |
335 | 338 | | |
336 | 339 | | |
337 | 340 | | |
338 | 341 | | |
339 | 342 | | |
340 | 343 | | |
341 | | - | |
342 | | - | |
| 344 | + | |
| 345 | + | |
343 | 346 | | |
344 | 347 | | |
345 | 348 | | |
| |||
349 | 352 | | |
350 | 353 | | |
351 | 354 | | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
| 355 | + | |
| 356 | + | |
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
| |||
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
388 | | - | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
389 | 393 | | |
390 | 394 | | |
391 | 395 | | |
| |||
0 commit comments