(7f772a7) Repair a Status field that lags its directory on mv, and bump to 0.32.6
This commit is contained in:
+14
-6
@@ -233,17 +233,25 @@ two exceptions below are files no command owns, and they are marked as such.
|
||||
first check `worklane ls done`. If it is there and should not be, its file has been moved
|
||||
into the wrong directory by hand or by a restore.
|
||||
|
||||
The repair is two moves, not one:
|
||||
`mv` reads the current status from the *directory*, so one move puts both halves right:
|
||||
move the ticket to the status it belongs in and the field travels with it.
|
||||
|
||||
```
|
||||
worklane mv 1b78a24 --status reviewing -f
|
||||
worklane mv 1b78a24 --status done -f
|
||||
```
|
||||
|
||||
`mv` reads the current status from the *directory*, so moving it to the status the
|
||||
directory already says it is in is refused as a no-op and the field stays wrong. Moving it
|
||||
away and back rewrites the field. Check with `worklane show 1b78a24`, whose `Status` line
|
||||
is read from the file rather than from where it sits.
|
||||
If the file is where it belongs and only the `Status` field inside is stale — a hand move
|
||||
that forgot the field, or a half-finished restore — name the directory the file actually
|
||||
sits in: a move there finds the field disagreeing with the directory and rewrites just
|
||||
the field, reporting the correction instead of refusing as a no-op.
|
||||
|
||||
```
|
||||
worklane mv 1b78a24 --status done
|
||||
```
|
||||
|
||||
That repair changes only the field: no stamp is written and no history entry either,
|
||||
because the work went nowhere. Check either repair with `worklane show 1b78a24`, whose
|
||||
`Status` line is read from the file rather than from where it sits.
|
||||
|
||||
### A command says the id matches several tickets
|
||||
|
||||
|
||||
Reference in New Issue
Block a user