Further dedup: title_for, ns_reverse, ensure_bound, pop_line, auto_push_refs, print_lines
Five more shared helpers that pull repeated boilerplate out of the
big call sites:
- workspace::title_for(repo, stable): the
`object::read(repo, &stable)?.map(|t| t.title()...).unwrap_or_default()`
trio appeared 3× in find_by_property / read_stack / list_namespace_tasks
/ list_inbox.
- workspace::ns_reverse(ns): the `BTreeMap<&StableId, u32>` reverse map
hand-built in two functions; one helper, one collector.
- namespace::ensure_bound(repo, name, stable, msg): the
`match human_for { Some(h) => h, None => assign_id(...) }` shape that
lived in import / accept / pull paths.
- patch::pop_line(rest, msg): the
`position(\n) + from_utf8 + trim('\r') + advance` ritual repeated
twice per file-block in patch parsing.
- lib::auto_push_refs(ws, remote, refs): the
`if let Some(r) = effective_remote(remote) { let _ = git_push_refs(...) }`
block at the tail of assign / accept / reject.
- lib::print_lines(items): collapses several `for x in ws.foo()? { println!("{x}") }`
loops in command_namespace / command_queue / prop keys / prop values.
Also folds command_reject's two passes through `key.rsplit_once('-')`
into one, and uses `TaskId::default()` for the empty-flags picker
construction in command_export (one new derive on TaskId).
Net −21 src lines on top of the previous −54 (cumulative −75 since
the bloat-reduction task started). 98 tests still green; no test
churn.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>