Simplify after review: dedupe hoist helpers, inline trivial wrapper
main·
Commit

- Extract hoistFirstMatch[T] generic and use it for both the new hoistSourceHeadCommand (PushCommand slice) and the existing orderTrunkFirst (DesiredRef slice). Same move-to-front-by-name algorithm in both; one implementation now.
- Drop syncSession.sourceHead() wrapper. The nil guard was dead code: every caller already dereferences s.sourceService directly nearby (.Protocol, .Capabilities() in the same Result builders). Inline as s.sourceService.HeadTarget at the six construction sites.
- Use syncertest.SetRefAtBranch instead of raw SetReference in the bootstrap-ordering integration test, matching the existing helper's use elsewhere in this file.
- Trim Result struct docstring trailer — the field's own line is enough.
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com Entire-Checkpoint: af47d0d2234c
Checkpoints
Checkpoint 1